The pod is a container group, so let's create a pod now, just like Dockerfile.
VI Nginx-pod.yaml (to pay great attention to the space, usually two spaces)
Add to:
Apiversion:v1
Kind:pod
Metadata
Name:nginx1
Spec
Containers
-NAME:NGINX1
Image:docker.io/nginx
Ports
-containerport:9001
Start pod
Kubectl create-f Nginx-pod.yaml
Use get Pods to view
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/88/89/wKioL1f7Tn_RJAOUAAAQwjCNxUA018.png "title=" 817cc777-d671-4aee-b74b-ca8300524af7.png "alt=" Wkiol1f7tn_rjaouaaaqwjcnxua018.png "/>
Kubectl describe pods Nginx
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/88/8D/wKiom1f7TtXTygtCAABSVHdnr4Y286.png "title=" C4a5a133-d8be-415a-8814-ba65dd8ae4ce.png "alt=" Wkiom1f7ttxtygtcaabsvhdnr4y286.png "/>
View at minion end:
Docker PS (it will start a pod-infrastructure container first, and then in this machine to find whether there is an nginx image, not to download)
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/88/89/wKioL1f7T5iB_nfqAABcz7uewhg554.png "title=" 2162c3c2-4073-43cb-b26a-66050973b254.png "alt=" Wkiol1f7t5ib_nfqaabcz7uewhg554.png "/>
More specific details about pod and YAML authoring and creating suggestions go to Google for information.
This article is from the "Linux" blog, so be sure to keep this source http://syklinux.blog.51cto.com/9631548/1860292
Docker Management Artifact-kubernetes-pod Chapter