Skip to content

Instantly share code, notes, and snippets.

@emreozkangit
Created October 4, 2021 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emreozkangit/b72da2a851d1b821c459a734bab3edf0 to your computer and use it in GitHub Desktop.
Save emreozkangit/b72da2a851d1b821c459a734bab3edf0 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: security-context-demo
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
volumes:
- name: sec-ctx-vol
emptyDir: {}
containers:
- name: sec-ctx-demo
image: busybox
resources:
requests:
memory: "64Mi"
cpu: "250m"
command: [ "sh", "-c", "sleep 1h" ]
volumeMounts:
- name: sec-ctx-vol
mountPath: /data/demo
securityContext:
allowPrivilegeEscalation: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment