You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
initContainers of init-pod pod (lab7-1.yaml) may not run at all because it depends on the latest busybox image.
I found the behavior change is in busybox:1.29 to busybox:1.32 (latest) see Nslookup does not work in latest busybox image #48.
[root@master01 learn]# kubectl run --attach busybox --rm --image=busybox:latest --restart=Never -- \
> sh -c "sleep 4 && nslookup kubernetes"
If you don't see a command prompt, try pressing enter.
Server: 10.96.0.10
Address: 10.96.0.10:53
** server can't find kubernetes.default.svc.cluster.local: NXDOMAIN
*** Can't find kubernetes.svc.cluster.local: No answer
*** Can't find kubernetes.cluster.local: No answer
*** Can't find kubernetes.default.svc.cluster.local: No answer
*** Can't find kubernetes.svc.cluster.local: No answer
*** Can't find kubernetes.cluster.local: No answer
pod "busybox" deleted
pod default/busybox terminated (Error)
busybox:1.28 is working fine.
[root@master01 learn]# kubectl run --attach busybox --rm --image=busybox:1.28 --restart=Never -- \
> sh -c "sleep 4 && nslookup kubernetes"
If you don't see a command prompt, try pressing enter.
Server: 10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local
Name: kubernetes
Address 1: 10.96.0.1 kubernetes.default.svc.cluster.local
pod "busybox" deleted
[root@master01 learn]#
So, a simple solution to solve this problem is to use busybox:1.28 as in this snippet.
thank you @ekc i almost go mad wondering why the Initpod wouldn't start. @sandervanvugt you should probably pin the busybox version in your repo files.
initContainers of init-pod pod (lab7-1.yaml) may not run at all because it depends on the latest busybox image.
I found the behavior change is in busybox:1.29 to busybox:1.32 (latest) see Nslookup does not work in latest busybox image #48.
busybox:1.28 is working fine.
So, a simple solution to solve this problem is to use busybox:1.28 as in this snippet.
Another useful tool to troubleshoot DNS problem in kubernetes in dnsutils.
The text was updated successfully, but these errors were encountered: