Requests timing out when accesing a Kubernetes clusterIP service Requests timing out when accesing a Kubernetes clusterIP service kubernetes kubernetes

Requests timing out when accesing a Kubernetes clusterIP service


I was running into a similar problem with my K8s cluster with Flannel. I had set up the vms with a NAT nic for internet connectivity and a Host-Only nic for node to node communication. Flannel was choosing the NAT nic by default for node to node communication which obviously won't work in this scenario.

I modified the flannel manifest before deploying to set the --iface=enp0s8 argument to the Host-Only nic that should have been chosen (enp0s8 in my case). In your case it looks like enp0s3 would be the correct NIC. Node to node communication worked fine after that.

I failed to note that I also modified the kube-proxy manifest to include the --cluster-cidr=10.244.0.0/16 and --proxy-mode=iptables which appears to be required as well.


Flushed all firewalls with iptables --flush and iptables -tnat --flush then restart docker fixed it

check this github issue link


Based on your logs and the fact that you had problems only with connections between nodes which use Flannel, I guess you had a problem with Flannel CNI during the installation.

In logs from node1 and master, I see the following messages:

Error adding network: open /run/flannel/subnet.env: no such file or directoryError while adding to cni network: open /run/flannel/subnet.env: no such file or directory

The root cause can be in network problem between VMs.

I recommend you to create 2 networks for each instance in your cluster - one with NAT for access to the Internet and one Host-only for in-cluster communication.

As an alternative way - you can use Bridge mode for interfaces of VMs if your network allows it.

Finally, the only suggestion I can provide - remove all cluster components and initialize cluster one more time using the configuration I mentioned above. That is the fastest way.