I have been working with a Kubernetes cluster and, I have deployed a cluster from an automated blueprint. After the deployment, I experienced the Kubernetes Cluster connectivity issue with Unable To Connect To The Server Tcp I/O Timeout error. I was able to figure out the issue and fix it after few troubleshooting attempts. I thought to share this with my readers to overcome with similar situations. Previously, I posted a Kubernetes deployment post and, if you want to deploy the cluster from the scratch just read my post.
I have just deployed my cluster using an automated blueprint and I just wanted to check the version of the cluster. Unfortunately, it was not succeeded and ended up with the below error. Also, it took so long to issue an output of the kubectl get nodes command. Finally, it gave me the same error.
Unable to connect to the server: dial tcp 10.0.0.3/6443: I/o timeout
I checked the current IP address of the Kube Master and I was shocked to realize that it was not the IP address assigned to my Master Node.
I check the /etc/kubernetes/kubelet.conf file and, cluster was previously configured to run with the 10.0.0.3 IP address.
So, I had two options to fix my issue. Either I do the config change according to the allotted IP address or change my IP address of the server.
It was really easy to change the IP address assignment with the help of my cloud DHCP server and I made an IP reservation in order to obtain the same IP address every time I spin up the application.
After rebooting the Master node I was able to run my Kubernetes Cluster without any issues and it was running as expected. Here is the output of the Cluster and the IP address after the change.
If you are using the Oracle Ravello Cloud, I have published a blueprint with 4 nodes you can find it here and please feel free to take a copy of the blueprint and I hope You might need to run this when you are running the application.
For Oracle Ravello Users, I added the reservation before I start the application as below.