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

原文地址:https://www.cnblogs.com/jjfan0327/p/13780801.html