1
votes

I have found some similar questions to kubernetes API server not starting but the error message I am getting is different. I have had a working cluster for several months, went to login yesterday and it was offline. Looked around in some log files and this is what I get below, looks like its trying to make a DNS query to my local DNS Server which has been working fine for the last few years and still works fine. The Log is below and I'm pretty frustrated because I don't know how to fix this, have made no config changes and hoping the community can help.

E0609 00:03:14.518792 1 controller.go:152] Unable to remove old endpoints from kubernetes service: StorageError: key not found, Code: 1, Key: /registry/masterleases/192.168.5.2, ResourceVersion: 0, AdditionalErrorMsg: F0609 00:03:14.534558 1 controller.go:161] Unable to perform initial IP allocation check: unable to refresh the service IP block: Get https://localhost:6443/api/v1/services: dial tcp: lookup localhost on 172.16.0.1:53: no such host

1

1 Answers

3
votes

In case anybody else comes across this issue, it had to do with a missing entry in my /etc/hosts file, there needs to be a line "127.0.0.1 localhost" for the api server to start correctly. If that is missing it tries to use a DNS server lookup which does not make sense, happy I have it working!