1

I'm having troubles with network access from pods. I had installed new Kubernetes cluster with flannel-network plugin, Checking the health of server - good.

I tried to check network via busybox: kubectl run -it --rm --restart=Never busybox -n microservices --image=busybox sh, then ping 8.8.8.8 results in drop.

But ping 8.8.8.8 succeeded when executed from kubectl exec -it kube-flannel-ds-amd64-xxxx -n kube-system (checking network inside flannel pod).

What can it be? I think it can be something with flannel or docker network configuration. But i did not find information about it.

I tried to change iptables configs, reinit cluster, create and changing docker network interfaces.

I have no more ideas, what can I do?

P.S. There is the same server installed before me and their settings and installation procedure are identical. And their connection is good.

2

1 Answer 1

3

I found the solution ...

Check your network interfaces (ifconfig -a cni0). Good config is:

cni0: flags=4163 mtu 1450 inet 10.244.0.1 netmask 255.255.255.0 broadcast 0.0.0.0...

That subnet (10.244.0.0) configured in flannel-deploy.yaml

But, by default, a new server may have:

cni0: flags=4163 mtu 1450 inet 192.168.0.1 netmask 255.255.255.0 broadcast 0.0.0.0...

Change it to:

ifconfig eth0 10.244.0.1 netmask 255.255.255.0 broadcast 0.0.0.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.