Kubeconfig
- Display the current configuration in the
kubeconfig
file
- Display the configuration in the specified
kubeconfig
file
- Set the current context to the specified context
Allow you to easily switch between different environments or clusters
- Retrieve the specified
kubeconfig
file and displays relevant cluster information
从 ServiceAccount 生成 kubeconfig
apiVersion: v1
current-context: dev-quant-admin@dev-quant
kind: Config
preferences: {}
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://kubernetes.default.svc.cluster.local
name: dev-quant
users:
- name: dev-quant-admin
user:
token:
contexts:
- context:
cluster: dev-quant
namespace: kube-system
user: dev-quant-admin
name: dev-quant-admin@dev-quant