I am creating a cluster using the following command:
kops create cluster --zones us-west-1c --master-size=m4.large --node-size=m5.large ${NAME} --associate-public-ip=false --topology private --api-loadbalancer-type internal --networking calico --vpc vpc-xxxxxxxx --cloud-labels="Creator=revor,Description=YM k8 cluster,ENV=int,Name=SMV_INT_YMK8,Requestor=Rey Reymond,code=5483"
The cluster gets created in aws. So far so good. But the problem is, when I run kops validate cluster
I get:
Validating cluster xxx.xxx.xx unexpected error during validation: error listing nodes: Get https://api. xxx.xxx.xx/api/v1/nodes: dial tcp 172.30.xx.xx:443: getsockopt: connection refused
and when I run kubectl get nodes
I get:
Unable to connect to the server: dial tcp 172.30.xx.xx:443: i/o timeout
Also when I run ssh -i ~/.ssh/id_rsa [email protected]
I get:
sh: connect to host api. xxx.xxx.xx port 22: Connection refused
My question is why I cannot connect to my cluster and why I'm getting the above errors?
As the above command shows, my cluster is defined to have a private topology and no public IP addresses and an internal loadbalancer. I'm wondering if that mean I should not be able to connect to my cluster and the above errors are expected?