diff --git a/README.md b/README.md index 6e3b06a..ea4c124 100644 --- a/README.md +++ b/README.md @@ -68,37 +68,38 @@ services: * if you want to use netshoot as a sidecar container to troubleshoot your application container ``` - $ cat netshoot-sidecar.yaml - apiVersion: apps/v1 - kind: Deployment +$ cat netshoot-sidecar.yaml + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-netshoot + labels: + app: nginx-netshoot +spec: + replicas: 1 + selector: + matchLabels: + app: nginx-netshoot + template: metadata: - name: nginx-netshoot - labels: - app: nginx-netshoot + labels: + app: nginx-netshoot spec: - replicas: 1 - selector: - matchLabels: - app: nginx-netshoot - template: - metadata: - labels: - app: nginx-netshoot - spec: - containers: - - name: nginx - image: nginx:1.14.2 - ports: - - containerPort: 80 - - name: netshoot - image: nicolaka/netshoot - command: ["/bin/bash"] - args: ["-c", "while true; do ping localhost; sleep 60;done"] - - $ kubectl apply -f netshoot-sidecar.yaml - deployment.apps/nginx-netshoot created - - $ kubectl get pod + containers: + - name: nginx + image: nginx:1.14.2 + ports: + - containerPort: 80 + - name: netshoot + image: nicolaka/netshoot + command: ["/bin/bash"] + args: ["-c", "while true; do ping localhost; sleep 60; done"] + +$ kubectl apply -f netshoot-sidecar.yaml +deployment.apps/nginx-netshoot created + +$ kubectl get pod NAME READY STATUS RESTARTS AGE nginx-netshoot-7f9c6957f8-kr8q6 2/2 Running 0 4m27s