EKS 로깅관련 실습을 해보자.
https://www.eksworkshop.com/docs/observability/resource-view/
use-cluster $EKS_CLUSTER_NAME
prepare-environment
prepare-environment observability/logging/cluster
1
컨트롤 플래인의 로그가 남도록 설정하자.
콘솔에서도 가능하다.
여기서는 CLI로 로그가 남도록 ON 하자.
aws eks update-cluster-config \
--region $AWS_REGION \
--name $EKS_CLUSTER_NAME \
--logging '{"clusterLogging":[{"types":["api","audit","authenticator","controllerManager","scheduler"],"enabled":true}]}'
aws eks wait cluster-active --name $EKS_CLUSTER_NAME
콘솔에서 확인해보자.
2
cloudwatch log에 가면 로그 쌓인것을 볼수 있다.
prepare-environment observability/logging/pods
kubectl get all -n aws-for-fluent-bit
1
prepare-environment observability/oss-metrics
// 준비 되는 내용은 yaml 파일을 보시면 확인할수 있습니다.
https://github.com/aws-samples/eks-workshop-v2
~/environment/eks-workshop/modules/observability/oss-metrics/adot/clusterrole.yaml
2
prepare-environment observability/oss-metrics 실행 했는데 오류나는경우
다시한번 실행~
어플리케이션 정보를 보자~
테스트후 부하 발생기는 지우자~
kubectl delete pod load-generator -n other
1
prepare-environment observability/container-insights
2
prepare-environment observability/kubecost
kubectl get deployment -n kubecost
kubectl get service -n kubecost kubecost-cost-analyzer -o jsonpath="{.status.loadBalancer.ingress[*].hostname}:9090{'\n'}"
https://www.eksworkshop.com/docs/observability/kubecost/amp
delete-environment
eksctl delete cluster $EKS_CLUSTER_NAME --wait
aws cloudformation delete-stack --stack-name eks-workshop-ide
삭제 참고 사이트
https://innoshome.notion.site/innoshome/Amazon-EKS-a328fadd565a42d8a8178628e826da36
감사합니다.