I noticed connectivity problems when trying to generate TLS certificates using cert-manager. I can successfully connect to different pods from the outside world (ingress works), but I can't reach the outside from within my pods.
To rule out any problems due to existing configurations, I re-created the complete cluster, without success, then again on a different machine with different network etc., without success. I tried Antrea and Flannel as the CNI.
Spinning up a short busybox
pod shows that pinging the host node works, but no other pods on the same host, not curl
ing them (even though an appropriate service was created), no DNS lookups and no global network reachability like ping 1.1.1.1
. The only reachable interface from within was 10.224.0.1
aka cni0
on the host network.
Related questions:
AFAICT, I closely followed the installation instructions (example below on a fresh Debian 11 with Docker and the other tools installed):
kubeadm init --control-plane-endpoint k8s-0.local --pod-network-cidr "10.224.0.0/16" --node-name k8s-0.local --service-cidr "10.196.0.0/16"
kubectl taint nodes --all node-role.kubernetes.io/master-
wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl apply -f kube-flannel.yaml
(I did make sure that the pod CIDR reflects the one flannel uses by default.)
Watching the pods and services during the last step of the installation, it shows that the CoreDNS was previously pending but changed to running. Afterwards, all pods are up and running successfully:
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system pod/coredns-78fcd69978-7bgdp 1/1 Running 0 5m52s
kube-system pod/coredns-78fcd69978-v5ptc 1/1 Running 0 5m52s
kube-system pod/etcd-k8s-0.local 1/1 Running 2 6m8s
kube-system pod/kube-apiserver-k8s-0.local 1/1 Running 0 6m5s
kube-system pod/kube-controller-manager-k8s-0.local 1/1 Running 0 6m5s
kube-system pod/kube-flannel-ds-fszkm 1/1 Running 0 108s
kube-system pod/kube-proxy-6s26v 1/1 Running 0 5m53s
kube-system pod/kube-scheduler-k8s-0.local 1/1 Running 2 6m5s
Any further help or guidance would be highly appreciated :)