apiVersion: v1 kind: Pod metadata: name: alpine-user-context spec: containers: - name: main image: alpine command: ["/bin/sleep", "999999"] securityContext: runAsUser: 405 ------------------------------------- apiVersion: v1 kind: Pod metadata: name: privileged-pod spec: containers: - name: main image: alpine command: ["/bin/sleep", "999999"] securityContext: privileged: true ------------------------------------- apiVersion: v1 kind: Pod metadata: name: kernelchange-pod spec: containers: - name: main image: alpine command: ["/bin/sleep", "999999"] securityContext: capabilities: add: - SYS_TIME ------------------------------------- apiVersion: v1 kind: Pod metadata: name: remove-capabilities spec: containers: - name: main image: alpine command: ["/bin/sleep", "999999"] securityContext: capabilities: drop: - CHOWN ------------------------------------- apiVersion: v1 kind: Pod metadata: name: readonly-pod spec: containers: - name: main image: alpine command: ["/bin/sleep", "999999"] securityContext: readOnlyRootFilesystem: true volumeMounts: - name: my-volume mountPath: /volume readOnly: false volumes: - name: my-volume emptyDir: ------------------------------------- apiVersion: v1 kind: Pod metadata: name: group-context spec: securityContext: fsGroup: 555 supplementalGroups: [666, 777] containers: - name: first image: alpine command: ["/bin/sleep", "999999"] securityContext: runAsUser: 1111 volumeMounts: - name: shared-volume mountPath: /volume readOnly: false - name: second image: alpine command: ["/bin/sleep", "999999"] securityContext: runAsUser: 2222 volumeMounts: - name: shared-volume mountPath: /volume readOnly: false volumes: - name: shared-volume emptyDir: