创建Pod对象: nginx-pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
基本管理:
#创建pod资源
kubectl create -f pod.yaml
#查看pods
kubectl get pods nginx-pod
#查看pod描述
kubectl describe pod nginx-pod
#更新资源
kubectl apply -f pod.yaml
#删除资源
kubectl delete pod nginx-pod