Skip to content

Instantly share code, notes, and snippets.

@gosharplite
Created Jul 6, 2020
Embed
What would you like to do?
Example yaml files
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: demo
spec:
selector:
matchLabels:
name: demo
template:
metadata:
labels:
name: demo
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
containers:
- name: demo
image: busybox
command: [ "sh", "-c", "sleep 1h" ]
securityContext:
allowPrivilegeEscalation: false
apiVersion: v1
kind: Namespace
metadata:
name: example-cheetah
labels:
district: hk-cheetah
region: hk
stage: test-stage
apiVersion: v1
kind: Pod
metadata:
name: demo
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
containers:
- name: demo
image: busybox
command: [ "sh", "-c", "sleep 1h" ]
securityContext:
allowPrivilegeEscalation: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment