apiVersion: v1
kind: Config
# Clusters 一节用于存储对多个 Master 的定义,大致包含证书,服务器地址等信息
clusters:
- cluster:
certificate-authority: certs/pd/ca.crt
server: https://10.211.55.87:6443
name: pd-secure
# Users 一节用于存储用户凭据,可对应 Token, Basic 等验证方法
users:
- name: fake-user
user:
password: password
username: admin
# Contexts 这里会用上面的集群和用户信息,来形成完整的连接信息
contexts:
- context:
cluster: pd-secure
namespace: kube-system
user: fake-user
name: pd-local
# 当前生效的 Context,可以利用 kubectl config use-context 来切换
current-context: pd-local
preferences: {}