1. 背景
如果您使用多个 Kubernetes 集群,当您从一个集群切换到另一个集群时,管理这样的配置文件很快就会变得很麻烦。
如果你的集群有多个命名空间,就会出现另一个痛点:每次使用kubectl时都需要指定–namespace或-n。结合多个集群,每个kubectl命令看起来都类似于kubectl --namespace <NAMESPACE_NAME> --kubeconfig <PATH_TO_KUBECONFIG> …
,这既耗时又容易出错。
这就是 Kubernetes context 发挥作用的地方。您可以将 Kubernetes 上下文视为一种快捷方式,让您可以方便地访问集群、用户和命名空间参数。
这允许您在配置文件中定义多个上下文,然后您可以将其用于定位多个 Kubernetes 集群,或具有不同用户集或命名空间的同一集群。您可以使用kubectl config use-context
命令在集群之间快速切换。但是,要使用该命令,您需要在 kubeconfig 中配置上下文。这可以通过kubectl config set-context命令来完成。
2. 配置文件
context 配置结构
一种选择是将 kubeconfig
文件放在$HOME/.kube/config
中,这是 kubectl 查找的默认路径。
另一种选择是使用标志--kubeconfig
。如果您的 kubeconfig
位于默认路径以外的其他位置,您可以使用此标志指定它并发出命令:
$ kubectl --kubeconfig path1 get pods
最后一个选项是使用KUBECONFIG
环境变量。此环境变量允许您通过将值设置为文件路径(以冒号分隔)来指定多个 kubeconfig 文件:
$ export KUBECONFIG=path1:path2:path3
$ kubectl get pods
kubeconfig结构:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJek1ESXhOREE1TVRRek1sb1hEVE16TURJeE1UQTVNVFF6TWxvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBS2hlCnF6b00vVkMxZy9TdFNydTJ5V0F5VkRCRUl0YzVBemtaUVpTTnFtNk42MmNS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d0pXSU8zQ1pyWjBCYllXTWVGZThGcDdZVTZabWpHcDAvaVArdS9xbEVwNmpkR21SZTd3SzlMdVNxd0p4TWcKc3UzZy9IQ2FoQ1BBWngwaHRKQkxyeTA1Qmt3bkxQeUl5bEsvd3UxR01Lc2JDdnFER2FrOWs3K1BUYkVyYzB3VwpqcnhxUStOZUNVN0ZWVmdUTGdDQnhLemFQMWxZcXpHKzFyeFNVOEZBSHREZUlVazBPWjVVTGdwOFRJQ2M5eE5kCitRTTJpTWd0VDJxTkoyWCtRakl6Nm5lRExBMyt4NWpCYUJ0UGpNS3V3ZHdGa1FqdzAyeFVCRUhRVW1wSTRPNW0Kc0NZPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
server: https://127.0.0.1:39275
name: kind-cluster2
contexts:
- context:
cluster: kind-kind
user: kind-kind
name: kind-kind
- context:
cluster: kind-hub
user: kind-hub
name: kind-hub
- context:
cluster: kind-cluster1
user: kind-cluster1
name: kind-cluster1
- context:
cluster: kind-cluster2
user: kind-cluster2
name: kind-cluster2
current-context: kind-cluster2
kind: Config
preferences: {}
users:
- name: kind-kind
user:
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lJRm1US25KNHFJSG93RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TXpBeU1UUXdPVEUwTXpKYUZ3MHlOREF5TVRRd09URTBOREZhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXhpc0VjemFySVJsdXlOMXkKOTZpYW9BUHpEbVM3TFBYeHpTQlVWN3FCRWpoN0lhTXhwWVpNeVBDK3dqRzFxeVV4WDM5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ZlJQWjNsZmdOdUR0QzI1akZDV3k4b2RKRUFPcmpJV2JoeXJmanpjd2wxWHFscApUVkJZR3Y4Sk5kU3hqbnFiUU90SzY3VVdhdlJBRjJyeHJIdWNHQktNKzNBZEgrakh6c3RyZlN0SC9XOTNtUXZOCkhTSEJmRDY3OFZHemZHYUVQbzRxOWpBWTcvc0dmME1rM2NnK2h5WGRBb0dCQU14bE0zWXZnUWptd0dlU1pkTWsKdyt6amhYMU1pQXFYTDZDQ1dCc0g5azZRK2xJd0ZqaUFNajJ0enJQY2JNcWRGWUxNMUJEWGkrZEhSZEt2L1NHbApObUVDMEZlWGVOT2Y5T2hIZ1dKbjZDRUFBTlNJaUlGb2ZhZjk3NnhjUzd5Qk5qS0lzdUQ2YWhEd2RGeHdoakJXCjhNa25MUE9RRHdVa0dSdXdCLytIWWhpUkFvR0FMVkVzeE5lSWdUOTFhQXVBSEsvY2c4QmUwSjZUWU5pQTZnTXoKbDZpK2l6a3NWRnhqdTViMkJEZCtFR01GbjRyUjJGVnhhclZLWEZZRUdtdDB6RXJhUjlrK2tGWnMzRG5qY3F1MwpkeDYxR1lRUzJFcFlSZVRCZDRLV0FnQTJxOEUvWTVCYmFZNGhCOFQvd1B5VWl0Vis3K0xENGJCRVhmc0xQY2NRCk13MUZBTzBDZ1lFQXRxU2piZjBubmZsQ2EzcTdJY2JvdFlHWUtQOFlSKzU5OENmTTdGOEtaKzVHQkI5MnRwSzcKT21vbTBEc0I1VjlWTlZGL1ExL1d1WVVmdWZoQThiZjNUMXhORVpNQ3hFd3phYkxUeTg2bEN6N2ZDNDUxSTdNVQpZaENyaGxQZ0J6VndSQWhBQnZYZUJUMVNqQnkyQWUrTVRDNVJnUEJTTDRmOHdTYllzc2l5NGRNPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
通常,kubeconfig 包含三个部分:
-
cluster
:此部分列出了您有权访问的所有集群。每个集群都包含有关 Kubernetes API 服务器的 URL(集群在其中接受来自 kubectl 的命令)、证书颁发机构和用于标识集群的名称的详细信息。 -
context
:这是与本教程最相关的部分,因为它列出了可用的上下文。每个上下文都包含您在调用它时可以访问的集群名称、用户和名称空间。请注意,在该示例中,命名空间信息被省略,因为它使用的是默认命名空间。 -
user
:用户部分通过唯一名称标识每个用户,并包含相关的身份验证信息,这些信息可以是客户端证书(如本例所示)、持有者令牌或身份验证代理。
3. 配置 context cluster 认证信息
kubectl config --kubeconfig=config-demo set-cluster development --server=https://1.2.3.4 --certificate-authority=fake-ca-file
kubectl config --kubeconfig=config-demo set-cluster test --server=https://5.6.7.8 --insecure-skip-tls-verify
4. 配置 context user 认证信息
kubectl config --kubeconfig=config-demo set-credentials developer --client-certificate=fake-cert-file --client-key=fake-key-seefile
kubectl config --kubeconfig=config-demo set-credentials experimenter --username=exp --password=some-password
5. 配置 context 信息
假设您有两个集群,一个用于开发工作,一个用于测试工作。在development
集群中,前端开发人员developer
在名为frontend
的名称空间中工作,存储开发人员在名为storage
的名称空间中工作。在测试集群test
中,开发人员使用默认名称空间(default
)工作,或者创建他们认为合适的辅助名称空间。访问开发群集需要通过证书进行身份验证。访问测试群集需要通过用户名和密码进行身份验证。
kubectl config --kubeconfig=config-demo set-context dev-frontend --cluster=development --namespace=frontend --user=developer
kubectl config --kubeconfig=config-demo set-context dev-storage --cluster=development --namespace=storage --user=developer
kubectl config --kubeconfig=config-demo set-context exp-test --cluster=test --namespace=default --user=experimenter
命令查看
kubectl config --kubeconfig=config-demo view
输出
apiVersion: v1
clusters:
- cluster:
certificate-authority: fake-ca-file
server: https://1.2.3.4
name: development
- cluster:
insecure-skip-tls-verify: true
server: https://5.6.7.8
name: test
contexts:
- context:
cluster: development
namespace: frontend
user: developer
name: dev-frontend
- context:
cluster: development
namespace: storage
user: developer
name: dev-storage
- context:
cluster: test
namespace: default
user: experimenter
name: exp-test
current-context: ""
kind: Config
preferences: {}
users:
- name: developer
user:
client-certificate: fake-cert-file
client-key: fake-key-file
- name: experimenter
user:
# Documentation note (this comment is NOT part of the command output).
# Storing passwords in Kubernetes client config is risky.
# A better alternative would be to use a credential plugin
# and store the credentials separately.
# See https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins
password: some-password
username: exp
6. 清理 context 信息
删除用户
kubectl --kubeconfig=config-demo config unset users.<name>
删除集群
kubectl --kubeconfig=config-demo config unset clusters.<name>
删除上下文
kubectl --kubeconfig=config-demo config unset contexts.<name>
7. 切换上下文
kubectl config --kubeconfig=config-demo use-context dev-frontend
或者
kubectl config use-context default
查看当前上下文
$ kubectl config current-context
default
查看指定上下文配置信息
$ kubectl config get-contexts default
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* default default default
只看当前上下文的配置信息文章来源:https://www.toymoban.com/news/detail-548277.html
kubectl config --kubeconfig=config-demo view --minify
输出:文章来源地址https://www.toymoban.com/news/detail-548277.html
apiVersion: v1
clusters:
- cluster:
certificate-authority: fake-ca-file
server: https://1.2.3.4
name: development
contexts:
- context:
cluster: development
namespace: frontend
user: developer
name: dev-frontend
current-context: dev-frontend
kind: Config
preferences: {}
users:
- name: developer
user:
client-certificate: fake-cert-file
client-key: fake-key-file
到了这里,关于Kubernetes context 上下文配置的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!