Last active
September 29, 2023 13:36
-
-
Save oscerd/83cf740a82b20626c20d1be1bc65927e to your computer and use it in GitHub Desktop.
This file contains 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:1.28 | |
command: [ "sh", "-c", "sleep 1h" ] | |
volumeMounts: | |
- name: sec-ctx-vol | |
mountPath: /data/demo | |
securityContext: | |
allowPrivilegeEscalation: false | |
runAsNonRoot: true | |
capabilities: | |
drop: | |
- ALL | |
seccompProfile: | |
type: RuntimeDefault |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment