kubedns container cannot connect to apiserver

6/4/2018

I've been trying to setup a k8s cluster using RPi3b+ following the instructions here (Using kubeadm).

I gave up on weave and switched to flannel for the CNI.

However, now I'm getting the the following errors from kube-dns:

pi@k8s-master-1:~ $ kubectl logs -f --namespace=kube-system kube-dns-686d6fb9c-4gl45 -c kubedns
.
.
I0603 23:51:04.245644       1 dns.go:173] Waiting for services and endpoints to be initialized from apiserver...
I0603 23:51:04.745684       1 dns.go:173] Waiting for services and endpoints to be initialized from apiserver...
.
.
E0603 23:51:33.747683       1 reflector.go:201] k8s.io/dns/pkg/dns/dns.go:147: Failed to list *v1.Endpoints: Get https://10.96.0.1:443/api/v1/endpoints?resourceVersion=0: dial tcp 10.96.0.1:443: i/o timeout
E0603 23:51:33.747683       1 reflector.go:201] k8s.io/dns/pkg/dns/dns.go:150: Failed to list *v1.Service: Get https://10.96.0.1:443/api/v1/services?resourceVersion=0: dial tcp 10.96.0.1:443: i/o timeout
.
.
I0603 23:52:03.246053       1 dns.go:173] Waiting for services and endpoints to be initialized from apiserver...
F0603 23:52:03.745975       1 dns.go:167] Timeout waiting for initialization

It appears that kubedns is trying to use port 443 to check on the cluster status when the api-server is running on port 6443.

I'm not sure where to turn next or what additional information to provide.

Thanks.

-- Neil Johnson
kubeadm
kubernetes

1 Answer

6/4/2018

Turns out I need to upgrade the version of kube-dns to a version that fixed the issue.

Found the answer here, but had to bump the version 1.14.10.

Had to be patient to wait for the pod to be re-created.

-- Neil Johnson
Source: StackOverflow