$ docker build -t localhost:5000/pingcap/chaos-mesh images/chaos-mesh
Sending build context to Docker daemon 37.32MB
Step 1/5 : FROM alpine:3.10
---> af341ccd2df8
Step 2/5 : ARG HTTPS_PROXY
---> Using cache
---> 20d2cb2306ee
Step 3/5 : ARG HTTP_PROXY
---> Using cache
---> 919a7089085f
Step 4/5 : RUN apk add tzdata --no-cache
---> Using cache
---> ff324fe7103e
Step 5/5 : COPY --from=pingcap/binary /src/bin/chaos-controller-manager /usr/local/bin/chaos-controller-manager
---> 53e0aca7dc92
Successfully built 53e0aca7dc92
Successfully tagged localhost:5000/pingcap/chaos-mesh:latest
# 通过 kind get clusters,验证本地已经有名为 chaos-mesh 的 kubernetes 运行
$ kind get clusters
chaos-mesh
# 通过 kubectl get nodes, 可以看到 chaos-mesh 由 1 个 master 节点组成,3个 worker 节点组成。
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
chaos-mesh-control-plane NotReady master 37s v1.12.8
chaos-mesh-worker NotReady <none> 15s v1.12.8
chaos-mesh-worker2 NotReady <none> 16s v1.12.8
chaos-mesh-worker3 NotReady <none> 15s v1.12.8
$ kubectl apply -f manifests/crd.yaml
customresourcedefinition.apiextensions.k8s.io/iochaos.pingcap.com created
customresourcedefinition.apiextensions.k8s.io/kernelchaos.pingcap.com created
customresourcedefinition.apiextensions.k8s.io/networkchaos.pingcap.com created
customresourcedefinition.apiextensions.k8s.io/podchaos.pingcap.com created
customresourcedefinition.apiextensions.k8s.io/timechaos.pingcap.com created
$ kubectl get pod -n chaos-testing
NAME READY STATUS RESTARTS AGE
chaos-controller-manager-f4c4ccd89-wdqjt 1/1 Running 0 17s
chaos-daemon-bq9nk 0/1 ContainerCreating 0 3m39s
chaos-daemon-nskks 0/1 ContainerCreating 0 3m38s
chaos-daemon-tgp62 0/1 ContainerCreating 0 3m38s