4.1 k8s-pod的基本操作

#创建pod

$ kubectl create -f ${pod_name}.yaml

 

# 查询pod的简要信息

$ kubectl get pod ${pod_name}

# json 格式显示pod的完整信息

$ kubectl get pod ${pod_name} --output json

# yaml 格式显示pod的完整信息

$ kubectl get pod ${pod_name} --output yaml

# 查询pod的状态和声明周期

$ kubectl describe pod ${pod_name} 

 

# 删除pod

$ kubectl delete pod ${pod_name}

 

# 更新pod

$ kubectl replace /path/to/${pod_name}.yaml --force

posted @ 2020-10-08 11:47  傑0327  阅读(100)  评论(0编辑  收藏  举报