gpt4 book ai didi

kubernetes - kubectl上下文与集群

转载 作者:行者123 更新时间:2023-12-04 13:30:24 28 4
gpt4 key购买 nike

在kubectl和kubernetes配置的世界中,上下文和集群之间有什么区别?例如,我看到以下命令:

Available Commands:
current-context Displays the current-context
delete-cluster Delete the specified cluster from the kubeconfig
delete-context Delete the specified context from the kubeconfig
get-clusters Display clusters defined in the kubeconfig
get-contexts Describe one or many contexts
rename-context Renames a context from the kubeconfig file.
set Sets an individual value in a kubeconfig file
set-cluster Sets a cluster entry in kubeconfig
set-context Sets a context entry in kubeconfig

在.kube / config中,我看到:
- context:
cluster: arn:aws:eks:us-west-2:91XXXXXXX71:cluster/ignitecluster
namespace: ignite
user: arn:aws:eks:us-west-2:91XXXXXXX71:cluster/ignitecluster
name: arn:aws:eks:us-west-2: 91XXXXXXX71:cluster/ignitecluster

最佳答案

集群为集群的Kubernetes API定义连接端点。

用户定义用于连接到群集的凭据。

上下文定义了群集和用户。

关于kubernetes - kubectl上下文与集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56299440/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com