简体   繁体   English

AWS 专用主机上的 Kubernetes - 我可以在现有集群上使用 kubectl 吗?

[英]Kubernetes on AWS dedicated host - Can I use kubectl on an existing cluster?

I have an app with several containers running just fine using kubernetes on AWS however now I need to port this to a AWS Dedicated Host VPC where the cluster has previously been created NOT using Kubernetes so I am not able to execute kube-up.sh or its kops equivalent我有一个包含多个容器的应用程序,在 AWS 上使用 kubernetes 运行得很好,但是现在我需要将它移植到 AWS 专用主机 VPC,其中以前不使用 Kubernetes 创建集群,因此我无法执行 kube-up.sh 或它的 kops 等价物

Is it possible to orchestrate my containers using kubernetes on a pre-existing cluster ?是否可以在预先存在的集群上使用 kubernetes 来编排我的容器? ( IE. have kubernetes probe the parent AWS cluster and treat it as if it created it ) (即,让 kubernetes 探测父 AWS 集群并将其视为创建它)

Of course until this linkage is made between my calls to kubectl and the parent AWS Dedicated Host VPC it has no Kubernetes context and just times out :当然,在我对 kubectl 和父 AWS 专用主机 VPC 的调用之间建立此链接之前,它没有 Kubernetes 上下文并且只是超时:

kubectl create -f /my/app/goodie.yaml kubectl create -f /my/app/goodie.yaml

Unable to connect to the server: dial tcp 34.199.89.247:443: i/o timeout无法连接服务器:dial tcp 34.199.89.247:443: i/o timeout

Possible alternative would be to call kube-up.sh or kops and demand the new cluster live inside a specified AWS Dedicated Host ... alas its not apparent Kubernetes has this flexibility ... yet !可能的替代方法是调用 kube-up.sh 或 kops 并要求新集群位于指定的 AWS 专用主机内......唉,Kubernetes 并不明显具有这种灵活性......但是!

Yes, definitely.当然是。 kubectl is just a client application and it can connect to any kubernetes cluster and orchestrate it. kubectl 只是一个客户端应用程序,它可以连接到任何 kubernetes 集群并对其进行编排。

If you get i/o timeout, you most likely have connectivity issues and some firewall/proxy in place.如果您遇到 i/o 超时,您很可能有连接问题和一些防火墙/代理。 Did you try to just access the kubernetes API through curl or telnet?您是否尝试通过 curl 或 telnet 访问 kubernetes API?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM