添加kubeconfig配置的步骤:
-
vi ~/.bash_profile
-
export KUBECONFIG=kube config文件路径
-
source ~/.bash_profile
查看版本号
kubectl describe pod -n enigma2 (pod_name)|grep TAG
查看和切换配置
kubectl config current-context
kubectl config use-context snail-context
查看SQL
kubectl get pods -A|grep mysql
查看日志
kubectl logs (pod_name)