yt-summer 发表于 2017-11-20 21:32:59

k8s 基础 pod操作


[*]
创建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
页: [1]
查看完整版本: k8s 基础 pod操作