4
votes

I want to set up Kubernetes Cluster on AWS using kops.

I have domain tutorialmate.com. I have added Nameserver provided by Route53.

Used below command to create cluseter:

kops create cluster --name=tutorialmate.com --state=s3://kop-state-009 --zones=eu-west-1a --node-count=2 --node-size=t2.micro --dns-zone=tutorialmate.com

Updated Cluster : kops update cluster tutorialmate.com --yes --state=s3://kop-state-009

But when trying to get nodes : kubectl get nodes

Getting below error :

Unable to connect to the server: dial tcp: lookup api.tutorialmate.com on 127.0.1.1:53: no such host

I should get details of nodes. I can see 3 EC2 instance are running under eu-west-1a. But getting the error as mentioned.

2

2 Answers

1
votes

probaly your local system dns can't resolve this name, so you put in hosts manualy this entry: Eg. on Windows C:\Windows\System32\drivers\etc\hosts

#Ip of AzureKubernetes service
172.20.xx.xx xxx-dns-xxxxxxxxx.privatelink.xxxx.azmk8s.io

0
votes

even I also got the same error, so I changed API server endpoint access from private to the public then it's working fine.

But I guess this is not the correct way so still, I am finding the proper solution with private mode.