Use busybox image v1.28 for DNS related examples (#13336)

This commit is contained in:
Dani Comnea 2019-03-22 22:32:10 +00:00 committed by Kubernetes Prow Robot
parent 8c4a729d84
commit 7c987a81b8
3 changed files with 10 additions and 10 deletions

View File

@ -112,7 +112,7 @@ spec:
hostname: busybox-1 hostname: busybox-1
subdomain: default-subdomain subdomain: default-subdomain
containers: containers:
- image: busybox - image: busybox:1.28
command: command:
- sleep - sleep
- "3600" - "3600"
@ -128,7 +128,7 @@ spec:
hostname: busybox-2 hostname: busybox-2
subdomain: default-subdomain subdomain: default-subdomain
containers: containers:
- image: busybox - image: busybox:1.28
command: command:
- sleep - sleep
- "3600" - "3600"
@ -192,7 +192,7 @@ metadata:
namespace: default namespace: default
spec: spec:
containers: containers:
- image: busybox - image: busybox:1.28
command: command:
- sleep - sleep
- "3600" - "3600"

View File

@ -112,19 +112,19 @@ metadata:
pod.beta.kubernetes.io/init-containers: '[ pod.beta.kubernetes.io/init-containers: '[
{ {
"name": "init-myservice", "name": "init-myservice",
"image": "busybox", "image": "busybox:1.28",
"command": ["sh", "-c", "until nslookup myservice; do echo waiting for myservice; sleep 2; done;"] "command": ["sh", "-c", "until nslookup myservice; do echo waiting for myservice; sleep 2; done;"]
}, },
{ {
"name": "init-mydb", "name": "init-mydb",
"image": "busybox", "image": "busybox:1.28",
"command": ["sh", "-c", "until nslookup mydb; do echo waiting for mydb; sleep 2; done;"] "command": ["sh", "-c", "until nslookup mydb; do echo waiting for mydb; sleep 2; done;"]
} }
]' ]'
spec: spec:
containers: containers:
- name: myapp-container - name: myapp-container
image: busybox image: busybox:1.28
command: ['sh', '-c', 'echo The app is running! && sleep 3600'] command: ['sh', '-c', 'echo The app is running! && sleep 3600']
``` ```
@ -140,14 +140,14 @@ metadata:
spec: spec:
containers: containers:
- name: myapp-container - name: myapp-container
image: busybox image: busybox:1.28
command: ['sh', '-c', 'echo The app is running! && sleep 3600'] command: ['sh', '-c', 'echo The app is running! && sleep 3600']
initContainers: initContainers:
- name: init-myservice - name: init-myservice
image: busybox image: busybox:1.28
command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;'] command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;']
- name: init-mydb - name: init-mydb
image: busybox image: busybox:1.28
command: ['sh', '-c', 'until nslookup mydb; do echo waiting for mydb; sleep 2; done;'] command: ['sh', '-c', 'until nslookup mydb; do echo waiting for mydb; sleep 2; done;']
``` ```

View File

@ -218,7 +218,7 @@ for i in 0 1; do kubectl exec web-$i -- sh -c 'hostname'; done
web-0 web-0
web-1 web-1
kubectl run -i --tty --image busybox dns-test --restart=Never --rm /bin/sh kubectl run -i --tty --image busybox:1.28 dns-test --restart=Never --rm /bin/sh
nslookup web-0.nginx nslookup web-0.nginx
Server: 10.0.0.10 Server: 10.0.0.10
Address 1: 10.0.0.10 kube-dns.kube-system.svc.cluster.local Address 1: 10.0.0.10 kube-dns.kube-system.svc.cluster.local