[英]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. 问题是主服务器不在弹性IP上。 So I went to the VPC settings in the AWS management console and bound it to one. 因此,我转到了AWS管理控制台中的VPC设置,并将其绑定到一个。 This obviously changed the ip of the master which I correspondingly changed in .kube/config
. 显然,这改变了我在.kube/config
相应更改的master的ip。
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
. 现在,无论何时我尝试使用kubectl做任何事情(例如, kubectl get pods
),我都会收到错误消息: 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? 是否有将主服务器绑定到弹性IP的正确方法? How do I fix this? 我该如何解决?
通过以下kube-down
解决了问题: kube-down
然后export MASTER_RESERVED_IP=[NEW_IP]
,然后kube-up
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.