Something is yet to be configured in coredns.
root@toolsbeta-test-k8s-master-1:~# cat busybox.yaml apiVersion: v1 kind: Pod metadata: name: busybox namespace: default spec: containers: - name: busybox image: busybox:1.28 command: - sleep - "3600" imagePullPolicy: IfNotPresent restartPolicy: Always root@toolsbeta-test-k8s-master-1:~# kubectl apply -f busybox.yaml pod/busybox created root@toolsbeta-test-k8s-master-1:~# kubectl get pods busybox NAME READY STATUS RESTARTS AGE busybox 1/1 Running 0 10s root@toolsbeta-test-k8s-master-1:~# kubectl exec -ti busybox -- nslookup kubernetes.default Server: 10.96.0.10 Address 1: 10.96.0.10 nslookup: can't resolve 'kubernetes.default' command terminated with exit code 1
The generated configuration file for kubelet by kubadm contains also a reference to this bogus 10.x range:
root@toolsbeta-test-k8s-master-1:~# grep -B1 10.96 /var/lib/kubelet/config.yaml clusterDNS: - 10.96.0.10
Right now, if you create a pod that contacts the API, it tries 10.x:
root@toolsbeta-test-k8s-master-1:~# kubectl logs nginx-ingress-59c8769f89-pzkdb -n nginx-ingress I0722 13:02:39.559078 1 main.go:155] Starting NGINX Ingress controller Version=edge GitCommit=18ab23a3 F0722 13:03:09.564409 1 main.go:261] Error trying to get the default server TLS secret nginx-ingress/default-server-secret: could not get nginx-ingress/default-server-secret: Get https://10.96.0.1:443/api/v1/namespaces/nginx-ingress/secrets/default-server-secret: dial tcp 10.96.0.1:443: i/o timeout
In this new cluster we are using: podSubnet: "192.168.0.0/16" so my first idea is the kube-apiserver pod should have an address in this range.