apiVersion: v1 //版本 kind: pod //類型,pod metadata: //元數據 name: String //元數據,pod的名字 namespace: String //元數據,pod的命名空間 labels: //元數據,標簽列表 - name: String //元數據,標簽的名字 annotations: //元數據,自定義注解列表 - name: String //元數據,自定義注解名字 spec: //pod中容器的詳細定義 containers: //pod中的容器列表,可以有多個容器 - name: String image: String //容器中的鏡像 imagesPullPolicy: [Always|Never|IfNotPresent]//獲取鏡像的策略 command: [String] //容器的啟動命令列表(不配置的話使用鏡像內部的命令) args: [String] //啟動參數列表 workingDir: String //容器的工作目錄 volumeMounts: //掛載到到容器內部的存儲卷設置 - name: String mountPath: String readOnly: boolean ports: //容器需要暴露的端口號列表 - name: String containerPort: int //容器要暴露的端口 hostPort: int //容器所在主機監聽的端口(容器暴露端口映射到宿主機的端口) protocol: String env: //容器運行前要設置的環境列表 - name: String value: String resources: //資源限制 limits: cpu: Srting memory: String requeste: cpu: String memory: String livenessProbe: //pod內容器健康檢查的設置 exec: command: [String] httpGet: //通過httpget檢查健康 path: String port: number host: String scheme: Srtring httpHeaders: