创建hell world pod
#vim hello-world-pod.yaml apiVersion: v1
kind: Pod
metadata:
name: hello-world
spec: 配置pod的具体规格
restartPolicy: OnFailure
containers:
- name: hello
image: "ubuntu:14.04"
command: ["/bin/echo","Hello","world"] #kubectl create -f hello-world-pod.yaml #kubectl get pod hello-world 查询 也可以用kubectl describe pod helloworld #kubectl logs hello-world删除 pod
kubectl delete pod hello
更新Pod
kubctl replace hello-world.yaml