简体   繁体   中英

How do I bind my kubernetes cluster master to an elastic ip with AWS?

I ran the install script:

export KUBERNETES_PROVIDER=aws; curl -sS https://get.k8s.io | bash

And it set up my cluster just fine. The problem is that the master was not on an elastic ip. So I went to the VPC settings in the AWS management console and bound it to one. This obviously changed the ip of the master which I correspondingly changed in .kube/config .

Now whenever I try to do anything with kubectl (eg kubectl get pods ) I get the error: error: couldn't read version from server: Get https://NEW_IP/api: x509: certificate is valid for OLD_IP, 10.0.0.1, not NEW_IP .

Is there a correct way to bind the master to an elastic IP? How do I fix this?

通过以下kube-down解决了问题: kube-down然后export MASTER_RESERVED_IP=[NEW_IP] ,然后kube-up

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