简体   繁体   中英

Unable to update kops cluster - DNS lookup error

error doing DNS lookup for NS records for "kubernetes.xxxx.xxx": lookup kubernetes.xxxxxxxx.xxx on 10.0.2.3:53: read udp 10.0.2.15:56154->10.0.2.3:53: i/o timeout

我的主节点入站规则

only my kops update cluster throws the following all other commands looks fine

here is my kops validate cluster

Using cluster from kubectl context: kubernetes.xxxx.xxx

Validating cluster kubernetes.xxxxxx.xxxx

INSTANCE GROUPS NAME ROLE MACHINETYPE MIN MAX SUBNETS master-xxx-xxxx-1a Master t2.micro 1 1 xx-xxxxx-1a nodes Node t2.micro 2 2 xx-xxxxxx-1a

NODE STATUS NAME ROLE READY ip-xxxx-xx-xx-xxx.xxx-xxxxx-x.compute.internal master True

Validation Failed Ready Master(s) 1 out of 1. Ready Node(s) 0 out of 2.

your nodes are NOT ready kubernetes.xxxxxx.xxx

You need just to add an entry to your /etc/resolv.conf

nameserver 8.8.8.8

NB : I suppose that you have well configured your NS record, otherwise you can follow this doc

It's a dns issue. I did a nslookup to my name servers and added the IP's to /etc/resolv.conf file

nameserver 10.0.2.3
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
search xxxxxx
search kubernetes.xxxxxx.xxx

and when i ran kops update cluster now. It fixed the issue.

As you wrote in the comment, you are trying to call the command from your VM which is outside of the VPC network.

Looks like in your system you set the DNS server address as 10.0.2.3:53 and it is unavailable, that's why you cannot resolve your zone from the VM.

To fix it, edit your /etc/hosts file and set the nameserver address to 8.8.8.8 , for example. If your Kubernetes DNS zone is OK, you will be able to resolve it, of course (in case you are using a public DNS zone).

With a private DNS zone, it is pretty the same, but you should set the DNS server address of that zone instead of 8.8.8.8 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM