this post was submitted on 25 Apr 2025
5 points (100.0% liked)
Kubernetes
1057 readers
1 users here now
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
https://pastebin.com/RhU5xtma I cant access any external address including dns servers, so, there is no firewall running on my pi (the master node), I can set the nameserver to be 1.1.1.1 in the pods config and iirc that works, but inside the pod, it doesn't work, so how do i fix this? You probably need more information so i can share. I am running calico as my CNI
Sorry - I totally misread this. You cannot access internet addresses. So it's a routing or NAT issue, most likely.
I assume you are using k3d for this, btw?
So.. on the "server" (eg. docker exec -ti k3d-k3s-default-server-0 -- /bin/sh), you should be able to "ping 8.8.8.8" successfully.
If not, the issue may lie with your host's docker setup.
Not k3d, just plain k3s
Your k3s/calico networking is likely screwed. Try creating a new cluster with flannel instead.
Well I switched to cilium, same issue, and the reason I started using a CNI earlier than I intended was because flannel didn't work.
This issue might seem complex but could you tell me some debugging stuff and logs to try to maybe get to the source of the issue or atleast provide a way to reproduce my issue (so I could maybe file a bug report)
It might be a simple issue like ip forwarding not being enabled, or host-level iptables configuration, or perhaps weird and wonderful routing (eg. wireguard or other VPNs).
Do you have any NetworkPolicies configured that could block ingress (to kubedns, in kube-system) or egress (in your namespace) ? If any ingress or egress networkpolicy matches a pod, it flips from AllowByDefault to DenyByDefault.
You should also do kubectl get service and kubectl get endpoints in kube-system, as well as kubectl get pods | grep -i dns
No networkpolicies.
Ignore powerdns, its just extra stuff, but yeah coredns is running
^ endpoints and services: