例:apiVersion: v1 kind: Pod metadata: name: web spec: # specification of the pod’s contents restartPolicy: Never containers: - name: web image: "httpd"containerPort: 80使用kubectl create -f执行即可创建名为httpd的容器
来源:https://www.cnblogs.com/networking/p/11769988.html