A Powerful Chaos Engineering Platform for Kubernetes
저번에 유저그룹 (https://www.facebook.com/groups/InfraEngineer) 에서 잠깐 얘기도 했고 저도 궁금하기도 해서 좀 다뤄봤는데요. 역시 바퀴는 사용하는게 맛맛 그 맛!
생각보다 쉽고요
https://chaos-mesh.org/
홈페이지에 나온대로 설치
curl -sSL https://mirrors.chaos-mesh.org/v1.0.2/install.sh | bash
[설치 과정]
[root@m-k8s ~]# curl -sSL https://mirrors.chaos-mesh.org/v1.0.2/install.sh | bash
Install Chaos Mesh chaos-mesh
customresourcedefinition.apiextensions.k8s.io/iochaos.chaos-mesh.org created
customresourcedefinition.apiextensions.k8s.io/kernelchaos.chaos-mesh.org created
customresourcedefinition.apiextensions.k8s.io/networkchaos.chaos-mesh.org created
customresourcedefinition.apiextensions.k8s.io/podchaos.chaos-mesh.org created
customresourcedefinition.apiextensions.k8s.io/podiochaos.chaos-mesh.org created
customresourcedefinition.apiextensions.k8s.io/podnetworkchaos.chaos-mesh.org created
customresourcedefinition.apiextensions.k8s.io/stresschaos.chaos-mesh.org created
customresourcedefinition.apiextensions.k8s.io/timechaos.chaos-mesh.org created
namespace/chaos-testing created
serviceaccount/chaos-controller-manager created
secret/chaos-mesh-webhook-certs created
clusterrole.rbac.authorization.k8s.io/chaos-mesh:chaos-controller-manager-target-namespace created
clusterrole.rbac.authorization.k8s.io/chaos-mesh:chaos-controller-manager-cluster-level created
clusterrolebinding.rbac.authorization.k8s.io/chaos-mesh:chaos-controller-manager-cluster-level created
clusterrolebinding.rbac.authorization.k8s.io/chaos-mesh:chaos-controller-manager-target-namespace created
role.rbac.authorization.k8s.io/chaos-mesh:chaos-controller-manager-control-plane created
rolebinding.rbac.authorization.k8s.io/chaos-mesh:chaos-controller-manager-control-plane created
service/chaos-dashboard created
service/chaos-mesh-controller-manager created
daemonset.apps/chaos-daemon created
deployment.apps/chaos-dashboard created
deployment.apps/chaos-controller-manager created
mutatingwebhookconfiguration.admissionregistration.k8s.io/chaos-mesh-mutation created
validatingwebhookconfiguration.admissionregistration.k8s.io/chaos-mesh-validation created
Waiting for pod running
chaos-controller-manager-59886dfb4d-x7zpk 0/1 ContainerCreating 0 10s
Waiting for pod running
Waiting for pod running
Chaos Mesh chaos-mesh is installed successfully
[설치하고 나서 파드와 서비스]
[root@m-k8s ~]# k get pod -n chaos-testing
NAME READY STATUS RESTARTS AGE
chaos-controller-manager-59886dfb4d-x7zpk 1/1 Running 0 2m8s
chaos-daemon-26dth 1/1 Running 0 2m8s
chaos-daemon-4pgmk 1/1 Running 0 2m8s
chaos-daemon-vpk2r 1/1 Running 0 2m9s
chaos-dashboard-6cbc9987f-8dg55 1/1 Running 0 2m8s
[root@m-k8s ~]# k get svc -A
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
chaos-testing chaos-dashboard LoadBalancer 10.110.250.102 192.168.1.12 2333:30176/TCP 6s
chaos-testing chaos-mesh-controller-manager ClusterIP 10.104.101.134 <none> 10081/TCP,10080/TCP,443/TCP 4m21s
default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 28d
default nginx LoadBalancer 10.97.98.8 192.168.1.11 80:31681/TCP 12d
kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 28d
참고: 디폴트는 nodePort라 LB로 바꿨어요
하고 나서 아래와 같이 클릭클릭하면 하면 짠 하고 테스트 프로시져가 돌아가는 구조네요
내부 스탠다드 QA만들때 괜찮을꺼 같아요 혹은 CI/CD 중에 QA에 넣고 성공적인 흐름을 만들때도 나쁘지 않을꺼 같고요.
QA Test procedure 만들기
하고 나서요 대략 한 20-30 분정도 k get pod -o wide -w를 하고 봤더니..뿅!
[root@m-k8s ~]# k get pod -o wide -w
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx-f89759699-2rrth 1/1 Running 0 17s 172.16.103.140 w2-k8s <none> <none>
nginx-f89759699-9lnvz 1/1 Running 4 12d 172.16.221.141 w1-k8s <none> <none>
nginx-f89759699-hsdqh 1/1 Running 2 4d22h 172.16.221.144 w1-k8s <none> <none>
<<< 시작 >>>>
nginx-f89759699-2rrth 1/1 Terminating 0 60s 172.16.103.140 w2-k8s <none> <none>
nginx-f89759699-2rrth 1/1 Terminating 0 60s 172.16.103.140 w2-k8s <none> <none>
nginx-f89759699-x2czg 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-x2czg 0/1 Pending 0 0s <none> w2-k8s <none> <none>
nginx-f89759699-x2czg 0/1 ContainerCreating 0 0s <none> w2-k8s <none> <none>
nginx-f89759699-x2czg 0/1 ContainerCreating 0 1s <none> w2-k8s <none> <none>
nginx-f89759699-x2czg 1/1 Running 0 5s 172.16.103.141 w2-k8s <none> <none>
nginx-f89759699-hsdqh 1/1 Terminating 2 4d22h 172.16.221.144 w1-k8s <none> <none>
nginx-f89759699-hsdqh 1/1 Terminating 2 4d22h 172.16.221.144 w1-k8s <none> <none>
nginx-f89759699-8gt7j 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-8gt7j 0/1 Pending 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-8gt7j 0/1 ContainerCreating 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-8gt7j 0/1 ContainerCreating 0 1s <none> w3-k8s <none> <none>
nginx-f89759699-8gt7j 1/1 Running 0 10s 172.16.132.8 w3-k8s <none> <none>
nginx-f89759699-9lnvz 1/1 Terminating 4 12d 172.16.221.141 w1-k8s <none> <none>
nginx-f89759699-nk52b 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-9lnvz 1/1 Terminating 4 12d 172.16.221.141 w1-k8s <none> <none>
nginx-f89759699-nk52b 0/1 Pending 0 0s <none> w1-k8s <none> <none>
nginx-f89759699-nk52b 0/1 ContainerCreating 0 0s <none> w1-k8s <none> <none>
nginx-f89759699-nk52b 0/1 ContainerCreating 0 1s <none> w1-k8s <none> <none>
nginx-f89759699-nk52b 1/1 Running 0 6s 172.16.221.146 w1-k8s <none> <none>
nginx-f89759699-8gt7j 1/1 Terminating 0 2m 172.16.132.8 w3-k8s <none> <none>
nginx-f89759699-8gt7j 1/1 Terminating 0 2m 172.16.132.8 w3-k8s <none> <none>
nginx-f89759699-2tnpc 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-2tnpc 0/1 Pending 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-2tnpc 0/1 ContainerCreating 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-2tnpc 0/1 ContainerCreating 0 1s <none> w3-k8s <none> <none>
nginx-f89759699-2tnpc 1/1 Running 0 5s 172.16.132.9 w3-k8s <none> <none>
nginx-f89759699-2tnpc 1/1 Terminating 0 60s 172.16.132.9 w3-k8s <none> <none>
nginx-f89759699-2tnpc 1/1 Terminating 0 60s 172.16.132.9 w3-k8s <none> <none>
nginx-f89759699-w72sz 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-w72sz 0/1 Pending 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-w72sz 0/1 ContainerCreating 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-w72sz 0/1 ContainerCreating 0 1s <none> w3-k8s <none> <none>
nginx-f89759699-w72sz 1/1 Running 0 5s 172.16.132.10 w3-k8s <none> <none>
nginx-f89759699-w72sz 1/1 Terminating 0 60s 172.16.132.10 w3-k8s <none> <none>
nginx-f89759699-w72sz 1/1 Terminating 0 60s 172.16.132.10 w3-k8s <none> <none>
nginx-f89759699-w8cz8 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-w8cz8 0/1 Pending 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-w8cz8 0/1 ContainerCreating 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-w8cz8 0/1 ContainerCreating 0 1s <none> w3-k8s <none> <none>
nginx-f89759699-w8cz8 1/1 Running 0 5s 172.16.132.11 w3-k8s <none> <none>
nginx-f89759699-nk52b 1/1 Terminating 0 4m 172.16.221.146 w1-k8s <none> <none>
nginx-f89759699-nk52b 1/1 Terminating 0 4m 172.16.221.146 w1-k8s <none> <none>
nginx-f89759699-62mnq 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-62mnq 0/1 Pending 0 0s <none> w1-k8s <none> <none>
nginx-f89759699-62mnq 0/1 ContainerCreating 0 0s <none> w1-k8s <none> <none>
nginx-f89759699-62mnq 0/1 ContainerCreating 0 1s <none> w1-k8s <none> <none>
nginx-f89759699-62mnq 1/1 Running 0 5s 172.16.221.147 w1-k8s <none> <none>
nginx-f89759699-x2czg 1/1 Terminating 0 7m 172.16.103.141 w2-k8s <none> <none>
nginx-f89759699-x2czg 1/1 Terminating 0 7m 172.16.103.141 w2-k8s <none> <none>
nginx-f89759699-r9pwl 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-r9pwl 0/1 Pending 0 0s <none> w2-k8s <none> <none>
nginx-f89759699-r9pwl 0/1 ContainerCreating 0 0s <none> w2-k8s <none> <none>
nginx-f89759699-r9pwl 0/1 ContainerCreating 0 1s <none> w2-k8s <none> <none>
nginx-f89759699-r9pwl 1/1 Running 0 6s 172.16.103.142 w2-k8s <none> <none>
nginx-f89759699-r9pwl 1/1 Terminating 0 60s 172.16.103.142 w2-k8s <none> <none>
nginx-f89759699-czrbr 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-r9pwl 1/1 Terminating 0 60s 172.16.103.142 w2-k8s <none> <none>
nginx-f89759699-czrbr 0/1 Pending 0 0s <none> w2-k8s <none> <none>
nginx-f89759699-czrbr 0/1 ContainerCreating 0 0s <none> w2-k8s <none> <none>
nginx-f89759699-czrbr 0/1 ContainerCreating 0 1s <none> w2-k8s <none> <none>
nginx-f89759699-czrbr 1/1 Running 0 6s 172.16.103.143 w2-k8s <none> <none>
nginx-f89759699-w8cz8 1/1 Terminating 0 4m 172.16.132.11 w3-k8s <none> <none>
nginx-f89759699-w8cz8 1/1 Terminating 0 4m 172.16.132.11 w3-k8s <none> <none>
nginx-f89759699-2tkmz 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-2tkmz 0/1 Pending 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-2tkmz 0/1 ContainerCreating 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-2tkmz 0/1 ContainerCreating 0 1s <none> w3-k8s <none> <none>
nginx-f89759699-2tkmz 1/1 Running 0 6s 172.16.132.12 w3-k8s <none> <none>
nginx-f89759699-2tkmz 1/1 Terminating 0 60s 172.16.132.12 w3-k8s <none> <none>
nginx-f89759699-2tkmz 1/1 Terminating 0 60s 172.16.132.12 w3-k8s <none> <none>
nginx-f89759699-q9nrh 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-q9nrh 0/1 Pending 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-q9nrh 0/1 ContainerCreating 0 0s <none> w3-k8s <none> <none>
nginx-f89759699-q9nrh 0/1 ContainerCreating 0 1s <none> w3-k8s <none> <none>
nginx-f89759699-q9nrh 1/1 Running 0 5s 172.16.132.13 w3-k8s <none> <none>
nginx-f89759699-czrbr 1/1 Terminating 0 3m 172.16.103.143 w2-k8s <none> <none>
nginx-f89759699-czrbr 1/1 Terminating 0 3m 172.16.103.143 w2-k8s <none> <none>
nginx-f89759699-fzkgc 0/1 Pending 0 0s <none> <none> <none> <none>
nginx-f89759699-fzkgc 0/1 Pending 0 0s <none> w2-k8s <none> <none>
nginx-f89759699-fzkgc 0/1 ContainerCreating 0 0s <none> w2-k8s <none> <none>
nginx-f89759699-fzkgc 0/1 ContainerCreating 0 1s <none> w2-k8s <none> <none>
nginx-f89759699-fzkgc 1/1 Running 0 5s 172.16.103.144 w2-k8s <none> <none>
끝나고 나서 대시보드 확인
댓글 없음:
댓글 쓰기