- Virtual Private Cloud (VPC)
- Identity and Access Management (IAM)
- Elastic Container Service for Kubernetes (EKS)
- Auto Scaling Groups (EC2)
- Metrics Server
- Cluster Autoscaler (CA)
- Traefik
- Grafana
- Prometheus
- Loki
- Fluent Bit
- Jaeger
Name | Description | Type | Default | Required |
---|---|---|---|---|
PROJECT |
Nombre del proyecto | string | falcon |
no |
ENV |
Nombre del entorno | string | k8s |
no |
- Crear cluster y nodes
make cluster
- Instalar Metrics Server
make metrics-server
- Instalar Cluster Autoscaler
make cluster-autoscaler
- Iniciar el escalado de pods y nodos:
kubectl apply -f https://k8s.io/examples/application/php-apache.yaml
kubectl autoscale deployment php-apache --cpu-percent=50 --min=1 --max=100
kubectl run apache-bench -i --tty --rm --image=httpd -- ab -n 5000000 -c 1000 http://php-apache.default.svc.cluster.local/
- Revisar el escalado de pods:
kubectl get hpa --watch
- Revisar el escalado de nodos:
kubectl get nodes --watch
- Revisar logs de cluster-autoscaler:
kubectl logs -f deployment/cluster-autoscaler -n kube-system
- Instalando Charts
make charts
- Instalar Jaeger:
make jaeger
- Desplegar aplicacion HotROD
make hotrod
- Acceder al servicio HotROD mediante localhost
kubectl port-forward service/hotrod 8080:8080
- Acceder al servicio Jaeger mediante localhost
kubectl -n monitoring port-forward service/jaeger-query 16686:80
- Instalando Prometheus
make prometheus
- Acceder al servicio mediante localhost
kubectl -n monitoring port-forward service/prometheus-server 9090:80
- Instalar Loki:
make loki
- Acceder al servicio mediante localhost
kubectl -n monitoring port-forward service/loki 3100
http://localhost:3100/api/prom/label
- Instalar Fluent Bit:
make fluent-bit
- Acceder al servicio mediante localhost
kubectl -n monitoring port-forward daemonset/fluent-bit-fluent-bit-loki 2020
http://localhost:2020/api/v1/metrics/prometheus
- Instalar Grafana
make grafana
- Acceder al servicio mediante localhost
kubectl -n monitoring port-forward service/grafana 8300:80
Plantilla JSON para la creacion del Dashboard.
- Instalando Traefik
make traefik
- Acceder al dashboard del servicio mediante localhost
http://localhost:9000/dashboard/#/
kubectl port-forward $(kubectl get pods --selector "app.kubernetes.io/name=traefik" --output=name) 9000:9000
make destroy