Created
October 4, 2021 08:33
-
-
Save emreozkangit/b72da2a851d1b821c459a734bab3edf0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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