Error listing nodes in cluster when using kubectl get nodes

Hello,

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 --name=kubernetes.newtech.academy --state=s3://kops-state-b3110b --zones=eu-central-1a --node-count=2 --node-size=t2.micro --master-size=t2.micro --dns-zone=kubernetes.newtech.academy

Where kubernetes.newtech.academy is my dns name in aws.*

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

Then, this:

kops rolling-update cluster kubernetes.newtech.academy --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 https://api.kubernetes.newtech.academy/api/v1/nodes: dial tcp: lookup api.kubernetes.newtech.academy on 192.168.1.1:53: 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