kubernetes yamlファイル解析
3529 ワード
# yaml pod :
apiVersion: v1 # , , 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 # ,
imagePullPolicy: [Always | Never | IfNotPresent] # Alawys IfnotPresent
# , ,Nerver
command: [string] # , ,
args: [string] #
workingDir: string #
volumeMounts: #
- name: string # pod , volumes[]
mountPath: string # mount , 512
readOnly: boolean #
ports: #
- name: string #
containerPort: int #
hostPort: int # , Container
protocol: string # , TCP UDP, TCP
env: #
- name: string #
value: string #
resources: #
limits: #
cpu: string #Cpu , core , docker run --cpu-shares
memory: string # , Mib/Gib, docker run --memory
requests: #
cpu: string #Cpu ,
memory: string # ,
livenessProbe: # Pod , , exec、httpGet
#tcpSocket,
exec: # Pod exec
command: [string] #exec
httpGet: # Pod HttpGet, Path、port
path: string
port: number
host: string
scheme: string
HttpHeaders:
- name: string
value: string
tcpSocket: # Pod tcpSocket
port: number
initialDelaySeconds: 0 # ,
timeoutSeconds: 0 # , , 1
periodSeconds: 0 # , , 10
successThreshold: 0
failureThreshold: 0
securityContext:
privileged: false
restartPolicy: [Always | Never | OnFailure] #Pod ,Always ,kubelet ,
#OnFailure Pod 0 ,Nerver Pod
nodeSelector: obeject # NodeSelector Pod label node , key:value
imagePullSecrets: #Pull secret , key:secretkey
- name: string
hostNetwork: false # , false, true,
volumes: # pod
- name: string # (volumes )
emptyDir: {} # emtyDir , Pod 。
hostPath: string # hostPath , Pod
path: string #Pod , mount
secret: # secret , secre
scretname: string
items:
- key: string
path: string
configMap: # configMap , configMap
name: string
items:
- key: string
path: string
転載:https://www.cnblogs.com/FRESHMANS/p/8444214.html