Summary of common commands used in Kubernetes work

① Operation command of configmap file: the namespace is platform, and the name of configmap is openapi

kubectl -n platform describe configmap openapi 
kubectl -n platform get configmap openapi -o yaml
kubectl -n platform edit configmap openapi 
kubectl -n platform delete configmap openapi 

② Deployment file operation command: the namespace is platform, and the deployment name is incident.

kubectl -n platform describe deployment incident
kubectl -n platform get deployment incident -o yaml
kubectl -n platform edit deployment incident
kubectl -n platform delete deployment incident   

③ The operation command of the pod file: the namespace is platform, the name of the pod is incident-7c97d958cf-25ddr

kubectl get pod -n platform
kubectl -n platform delete pod incident-7c97d958cf-25ddr
kubectl -n platform logs incident-7c97d958cf-25ddr

④ Upgrade related commands:

helm list -n platform
helm get values -n platform openapi > /data/gh/openapi.yaml
helm repo update
helm upgrade -i -n platform openapi local-xd/openapi --version 0.1.0-bug-1-gh -f /data/gh/openapi.yaml

Supongo que te gusta

Origin blog.csdn.net/qq_42764468/article/details/132711187
Recomendado
Clasificación