常用k8s 命令
删除node
删除node
1、在master上 kubectl delete nodes k8s-node03
2、在k8s-node03上 kubeadm reset
3、在k8s-node03上 重新 kubeadm join +
k8s命令补全
yum install -y bash-completion
source /usr/share/bash-completion/bash_completion
source <(kubectl completion bash)
echo "source <(kubectl completion bash)" >> ~/.bashrc
创建k8s标签
kubectl label nodes cwn21caipftagap01 ccb-ai-cvat=CAIPFTAGAP
harbor
aipf.harbor.io
查询标签
kubectl get node --show-labels | grep CAIPFTAGAP
kubectl get node --show-labels | grep CAIPFBASEAP
删除标签
kubectl label nodes k8s-node-01 ccb-ai-cvat-
kubectl label nodes k8s-node-01 ccb-ai-seldon-
kubectl label nodes k8s-node-01 ccb-ai-platform-
kubectl label nodes k8s-node-01 ccb-ai-mysql-
kubectl label nodes k8s-master-01 ccb-ai-seldon-
kubectl label nodes k8s-master-01 ccb-ai-platform-
kubectl label nodes k8s-master-01 ccb-ai-mysql-
kubectl label nodes k8s-master-01 ccb-ai-cvat-