Just a random app example in python. It creates a simple app, a sidecar fluentd logging into elastic
- AWS Account
- Python Local
- Podman or Docker Desktop
eksctl create cluster
--name random-number-cluster
--region us-east-2
--nodegroup-name random-number-nodes
--node-type t3.medium
--nodes 2
--nodes-min 1
--nodes-max 3
--managed
aws ecr create-repository --repository-name random-number-app --region us-east-1
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin .dkr.ecr.us-east-2.amazonaws.com
Change on deployment.yaml
docker build -t random-number-app .
docker tag random-number-app:v1 .dkr.ecr.us-east-2.amazonaws.com/random-number-app:v1
docker push .dkr.ecr.us-east-2.amazonaws.com/random-number-app:v1
kubectl apply -f deployment.yaml kubectl apply -f service.yaml
kubectl get svc random-guid-service
kubectl get svc random-guid-service
kubectl get pods -o custom-columns="POD:metadata.name,IMAGE:spec.containers[*].image"
kubectl create configmap fluentd-config --from-file=fluent.conf
kubectl describe pod random-number-deployment-bcb4c974d-t9hzt
kubectl logs elasticsearch-698648d5bb-x6h5s -c elasticsearch
kubectl logs elasticsearch-698648d5bb-x6h5s -c fluentd
curl -X GET "http://:9200/_cat/indices?v"
http://.us-east-2.elb.amazonaws.com:5601/
kubectl exec -it kibana-569b469d7f-hb84b -- curl http://elasticsearch:9200