apiVersion: v1
kind: Pod
metadata:
  name: meta_test
  labels:
    app: meta_test
  annotations:
    meta: _test 
  namespace: test
  clusterName: test_cluster
spec:
  volumes:
  - name: host_path_test_volume
    hostPath:
      path: /path/to/host/vol
      type: Directory
  - name: empty_dir_test_volume
    emptyDir:
      medium: Memory
      sizeLimit: 100m
  - name: gce_pd_test_volume
    gcePersistentDisk:
      pdName: gce_pd_test_volume
      fsType: ext4
      partition: 1
      readOnly: true
  containers:
  - name: container_name
    image: container_image
    command:
    - set
    - of
    - commands
    args:
    - set
    - of
    - args
    workingDir: /path/to/wd
    ports:
    - name: port_name
      hostPort: 8080
      containerPort: 80
      protocol: TCP
      hostIP: 127.0.0.1
    envFrom:
    - prefix: FROM_CONFIG_
      configMapRef: 
        name: configMapName
        optional: false
    - prefix: FROM_SECRET_
      secretRef:
        name: secretName
    env:
    - name: key
      value: value
    - name: key
      valueFrom:
        fieldRef:
          fieldPath: status.hostIP
    - name: key
      valueFrom:
        resourceFieldRef:
          resource: requests.cpu
    - name: key
      valueFrom:
        configMapKeyRef:
          name: configMapName
          key: key.in.map
          optional: false
    - name: key
      valueFrom:
        secretKeyRef:
          name: secretName
          key: key.in.secret
          optional: false
    resources:
      limits:
        memory: "256M"
        cpu: "1"
      requests:
        memory: "64M"
        cpu: "250m"
    volumeMounts:
    - name: host_path_test_volume
      readOnly: true
      mountPath: /var/lib/vol
      subPath: /var/lib/sub/path
      mountPropagation: Bidirectional
    - name: empty_dir_test_volume
      readOnly: false
      mountPath: /var/lib/vol
      subPath: /var/lib/sub/path
      mountPropagation: HostToContainer
    - name: gce_pd_test_volume
      readOnly: false
      mountPath: /var/lib/vol
      subPath: /var/lib/sub/path
      mountPropagation: HostToContainer
    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
        httpHeaders:
        - name: X-Custom-Header
          value: Awesome
      initialDelaySeconds: 3
      periodSeconds: 3
    readinessProbe:
      tcpSocket:
        port: 8080
      initialDelaySeconds: 5
      periodSeconds: 10
    lifecycle:
      postStart:
        httpGet:
          path: /healthz
          port: 8080
          httpHeaders:
          - name: X-Custom-Header
            value: Awesome
      preStop:
        exec:
          command:
          - cat
          - /tmp/healthy
    terminationMessagePath: /path/to/termination
    terminationMessagePolicy: File
    imagePullPolicy: Always
    stdin: true
    stdinOnce: true
    tty: true
    securityContext: 
      capabilities:
        add: 
        - NET_ADMIN
        - PID
        drop:
        - NET_ADMIN
        - WALK
      seLinuxOptions:
        user: user
        role: role
        type: type
        level: level
      privileged: true
      runAsUser: 8
      runAsNonRoot: true
      readOnlyRootFilesystem: true
      allowPrivilegeEscalation: true
status:
  phase: Running
              
