kubernetes yaml文件格式

模版格式

注意大小写,注意首行缩紧

apiVersion: v1  //k8s版本
kind: Pod    //类型
metadata:    //元数据
  name: nginx  //名称
  labels:
    app: web
spec:      //详细
  containers:  //容器/多个容器
    - name: nginx  //容器名称
      image: 10.0.0.11:5000/nginx:1.13   //镜像地址
      ports:
        - containerPort: 80       //容器端口

原文地址:https://www.cnblogs.com/houjunjun437416/p/11924471.html