问题描述
我使用kops
在aws中创建kubernetes集群.
I use kops
create kubernetes cluster in aws.
我想使用以下命令来验证集群:
I want to validate the cluster using this command:
kops validate cluster
标准输出给我:Using cluster from kubectl context: minikube
我认为问题是错误的上下文,但是为什么我kops
不为我创建上下文?
I think the problem is the wrong context, but why I kops
does not create context for me?
这是我的情况:
kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* minikube minikube minikube
没有aws kubernetes集群上下文.
there is no aws kubernetes cluster context.
我该如何解决?
推荐答案
kops 可帮助您创建通过命令行来破坏,升级,维护生产级的高可用性Kubernetes集群.目前已正式支持AWS(Amazon Web Services),并已在Beta中支持GCE,并在alpha中提供了VMware vSphere,并计划了其他平台.
kops helps you to create, destroy, upgrade and maintain production-grade, highly available Kubernetes clusters from the command line. AWS (Amazon Web Services) is currently officially supported, with GCE in beta support , and VMware vSphere in alpha, and other platforms planned.
您的实际配置使用先前安装中的minikube配置文件.很好.有一些是很有用的群集在一个配置中并在它们之间切换.
Your actual configuration uses minikube config file from the previous installation. And it is fine. It’s useful to have a fewclusters in one config and switch between them.
扩展的配置将保存到〜/.kube/config文件中,您可以尝试:
The extended configuration will be saved into a ~/.kube/config file, you may try:
kops导出kubeconfig $ {CLUSTER_NAME}
kops export kubeconfig ${CLUSTER_NAME}
这篇关于kops-获取错误的kubectl上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!