<2> 슬랙으로 전달 kwatch? 1 kwatch helps you monitor all changes in your Kubernetes(K8s) cluster, detects crashes in your running apps in realtime, and publishes notifications to your channels (Slack, Discord, etc. https://github.com/abahmed/kwatch https://artifacthub.io/packages/helm/kwatch/kwatch https://kwatch.dev/blog/monitor-pvc-usage 2 # configmap 생성 cat < ~/kwatch-config.yaml apiVersion: v1 kind: Namespace metadata: name: kwatch --- apiVersion: v1 kind: ConfigMap metadata: name: kwatch namespace: kwatch data: config.yaml: | alert: slack: webhook: 'https://hooks.slack.com/services/xxxxxxxxxxxxxxxx' title: $NICK-EKS #text: pvcMonitor: enabled: true interval: 5 threshold: 70 EOT kubectl apply -f kwatch-config.yaml # 배포 kubectl apply -f https://raw.githubusercontent.com/abahmed/kwatch/v0.8.3/deploy/deploy.yaml 3 잘못된 pod 배포 해서 알람 확인? # 터미널1 watch kubectl get pod # 잘못된 이미지 정보의 파드 배포 kubectl apply -f https://raw.githubusercontent.com/junghoon2/kube-books/main/ch05/nginx-error-pod.yml kubectl get events -w # 이미지 업데이트 방안2 : set 사용 - iamge 등 일부 리소스 값을 변경 가능! kubectl set kubectl set image pod nginx-19 nginx-pod=nginx:1.19 # 삭제 kubectl delete pod nginx-19 4 kwatch 삭제 ? kubectl delete -f https://raw.githubusercontent.com/abahmed/kwatch/v0.8.3/deploy/deploy.yaml