1. 指定kubeconfig 文件地址

1
kubectl --kubeconfig ~/k8s/config get pods

默认使用的配置文件地址是: ~/.kube/config