本机安装kubectl
配置kubeconfig
vi ~/.kube/config
拷贝文件
https://kubernetes.io/docs/reference/kubectl/cheatsheet/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| kubectl get namespaces
kubectl get deployments -n dubhe-test
kubectl get pods -n dubhe-test | grep dubhe-metadata-deploy
kubectl exec -it -n dubhe-test dubhe-metadata-deploy-758df87bfd-wqhs2 -- /bin/bash
cd /dubhe-metadata-biz/logs
kubectl cp -n dubhe-test dubhe-metadata-deploy-758df87bfd-wqhs2:/dubhe-metadata-biz/logs ./
|