Error listing nodes in cluster when using kubectl get nodes


I’m trying to launch k8s with kops, but I have some errors.
Firstly, I installed kops, then kubectl. Then I created a dns name in aws, a S3 bucket.

Then, I launched theses commands:

kops create cluster --state=s3://kops-state-b3110b --zones=eu-central-1a --node-count=2 --node-size=t2.micro --master-size=t2.micro

Where is my dns name in aws.*

Then I launched this:
kops create secret --name sshpublickey admin -i /home/snunez/.ssh/ --state=s3://kops-state-b3110b

Then, this:

kops rolling-update cluster --state=s3://kops-state-b3110b

But when I launch this, it tells me that:

`Unable to reach the kubernetes API.
Use --cloudonly to do a rolling-update without confirming progress with the k8s API

error listing nodes in cluster: Get dial tcp: lookup on no such host`

And I don’t know what can I do. When I do a “kubectl get node”, I have nothing.

So, please can you help me and tell me why ?

Thanks a lot : )

1 Like