工具
工具
shell
curl -sS https://webinstall.dev/k9s | bashKubectx Kubens Kubecolor Kubetail Kubebox Lens K9s
kubectl 命令补全
shell
source <(kubectl completion bash) # 对于 bash 用户
source ~/.bashrc # 或 ~/.zshrc 根据你的 shell 配置文件命令
- 删除
shell
kubectl delete pod maven-pod-1jvkx-5g1zr --grace-period=0 --force -n devops- 停止这个ns下的所有deployment
shell
kubectl -n <namespace> scale deploy --all --replicas=0- 获取所有pvc
shell
kubectl -n default get pod \
-o jsonpath='{range .items[?(@.spec.volumes[*].persistentVolumeClaim)]}{.metadata.name}{"\n"}{end}'