简体   繁体   中英

Kubernetes on AWS using Kops - kube-apiserver authentication for kubectl

I have setup a basic 2 node k8s cluster on AWS using KOPS .. I had issues connecting and interacting with the cluster using kubectl ... and I keep getting the error: The connection to the server api.euwest2.dev.avi.k8s.com was refused - did you specify the right host or port? when trying to run any kubectl command .....

have done basic kops export kubecfg --name xyz.hhh.kjh.k8s.com --config=~$KUBECONFIG --> to export the kubeconfig for the cluster I have created. Not sure what else I'm missing to make a successful connection to the kubeapi-server to make kubectl work ?

Sounds like either:

  • Your kube-apiserver is not running.
    • Check with docker ps -a | grep apiserver docker ps -a | grep apiserver on your Kubernetes master.
  • api.euwest2.dev.avi.k8s.com is resolving to an IP address where your nothing is listening.
    • 208.73.210.217 ?
  • You have the wrong port configured for your kube-apiserver on your ~/.kube/config
    • server: https://api.euwest2.dev.avi.k8s.com:6443 ?

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