Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 30 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down