0

I was given some very raw instructions to set up a kubernetes cluster, including some setup scripts to run, and no leisure time to read all the docs. Also I had some guest VMs setup for me in ESX. Everyone I work with is new to kubernetes, so present ability to answer questions is limited, and we are feeling our way to establish best practices. After some initial success running a deployment, getting pods to run, software worked as expected, my configuration is now broken. I had started to alter my network configuration, and also tweak my .yaml deployment files. All the kubectl commands presently fail with a message like this:

Unable to connect to the server: dial tcp 10.x.y.z:6443: getsockopt: no route to host

The IP address now longer resolves. I believe now the issue is I had switched from DHCP to static on my guest VMs at a later time. I had not realized the VMs were originally booted with DHCP, as the intent had always been to use static addresses. So when I ran these kubernetes setup scripts, I promulgated this now-bogus DHCP address into the cluster, and now need to fix it. So for example:

root@k8-node-01:~# grep server $HOME/.kube/config
    server: https://10.x.y.z:6443
root@k8-node-01:~# 
  1. Can I address the problem simply by writing the correct new address into the above file and others, and then rebooting my kubernetes nodes?
  2. What other config files might I need to change, besides my deployment yaml files?
  3. I see the configuration file includes some certificate info, and I am thinking it may be tied to my original IP address. If so, then merely changing to the IP might not work, so what would I do then?
  4. Originally I was thinking to just "reinstall" the cluster, but since kubectl doesn't work right now, best steps aren't clear. Can I just apt-get purge kubernetes?
  5. Seems like so much of the kubernetes instructions I have seen have hard-coded IPs instead of DNS addresses. Why is that? Are there any actual limitations?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.