简体   繁体   English

如何使用AWS将kubernetes集群主服务器绑定到弹性IP?

[英]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.

相关问题 如何将现有的弹性 IP 分配给 AWS 中 kops 集群的主节点 - How to assign existing elastic IP to master nodes of kops cluster in AWS 如何使用AWS自动扩展来扩展具有1个主节点和2个核心节点的AWS EMR集群? 有办法吗? - How do I scale my AWS EMR cluster with 1 master and 2 core nodes using AWS auto scaling? Is there a way? 如何配置kubernetes-aws中的集群IP? - how is cluster IP in kubernetes-aws configured? 如何让我的 AWS EKS Kubernetes 集群公开可见? - How do I get my AWS EKS Kubernetes Cluster to be visible publicly? AWS上的Kubernetes多主群集 - Kubernetes multi-master cluster on AWS 使用 kubeadm 初始化 kubernetes 集群,但在 aws 上是公共 IP - init a kubernetes cluster with kubeadm but public IP on aws 我的 AWS VPC 中的 IP 空间有限。 如何在工作节点和控制平面位于不同子网的 AWS 中设置 Kubernetes - I have limited IP space in my AWS VPC. How do I setup Kubernetes in AWS where worker nodes and control plane are in different subnets AWS Elastic Kubernetes 服务:如何将容器/pod 公开到 AWS 内的 Elasticsearch 集群? - AWS Elastic Kubernetes Service: how to expose a container/pod to an Elasticsearch cluster inside AWS? 如何在 AWS 的网络接口 eth 1 中的弹性 IP 地址上部署我的第二个网站? - How can I deploy my second website on Elastic IP address in network interface eth 1 in AWS? 当我的 aws lambda 函数执行时如何选择弹性 IP - How to choose Elastic IP when my aws lambda function execute
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM