38 kubectl get cm -A 39 # 查看所有serviceaccounts信息 40 kubectl get sa -A 41 # 查看所有daemonsets信息 42 kubectl get ds -A 43 # 查看所有deployments信息 44 kubectl get deploy -A 45 # 查看所有replicasets信息 46 kubectl get rs -A 47 # 查看所有statefulsets信息 48 kubectl get sts -A...
kubectl get svc -n kube-system # 查看componentstatuses信息 kubectl get cs # 查看所有configmaps信息 kubectl get cm -A # 查看所有serviceaccounts信息 kubectl get sa -A # 查看所有daemonsets信息 kubectl get ds -A # 查看所有deployments信息 kubectl get deploy -A # 查看所有replicasets信息 kubectl g...
kubectl get deploy xx -o yaml |kubectl replace --force -f - #通过-o yaml获取yaml文件,再replace重启 三、删除deploy/sts, 后重建 Kubectl get deploy xx -o yaml >/yy/xx.yaml kubectl delete deploy xx && kubectl apply -f /...
kubectlgetcm -A# 查看所有serviceaccounts信息 kubectlgetsa -A# 查看所有daemonsets信息 kubectlgetds -A# 查看所有deployments信息 kubectlgetdeploy -A# 查看所有replicasets信息 kubectlgetrs -A# 查看所有statefulsets信息 kubectlgetsts -A# 查看所有jobs信息 kubectlgetjobs -A# 查看所有ingresses信息 kubectl...
42 kubectl get ds -A 43 # 查看所有deployments信息 44 kubectl get deploy -A 45 # 查看所有replicasets信息 46 kubectl get rs -A 47 # 查看所有statefulsets信息 48 kubectl get sts -A 49 # 查看所有jobs信息 50 kubectl get jobs -A
alias kgh='kubectl get hpa' # Delete resources alias kd='kubectl delete' alias kdp='kubectl delete pods' alias kdd='kubectl delete deployments' alias kgs='kubectl delete service' Start a temporary pod that dies on exit You can quickly create a temporary pod with shell session for testing pu...
(Intermediate): explain 查看资源的文档 get 显示一个或更多 resources edit 在服务器上编辑一个资源 delete Delete resources by filenames, stdin, resources and names, or by resources and label selectorDeploy Commands: rollout Manage the rollout of a resource scale Set a new size for a Deployment,...
'# 获取所有节点的 ExternalIP$ kubectl get nodes -ojsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'# 列出属于某个 PC 的 Pod 的名字# “jq”命令用于转换复杂的 jsonpath,参考 https://stedolan.github.io/jq/$sel=${$(kubectl get rc my-rc --output=json|...
kubectl get deploy/deployment-name -o yaml --export> deploy-name.yaml 出现提示: Flag –export has been deprecated, This flag is deprecated and will be removed in future. 该flag 1.14版本弃用,1.18版本移除,目前已经不可用。 替代方案: 1
get 显示一个或更多 resources edit 在服务器上编辑一个资源 delete Delete resources by filenames, stdin, resources and names, or by resources and label selector Deploy Commands: rollout Manage the rollout of a resource scale 为 Deployment, ReplicaSet, Replication Controller 或者 Job 设置一个新的副...