Skip to content

Instantly share code, notes, and snippets.

@gosharplite
Created July 6, 2020 08:45
Show Gist options
  • Save gosharplite/3c193637b54c4f255f596373da0fd256 to your computer and use it in GitHub Desktop.
Save gosharplite/3c193637b54c4f255f596373da0fd256 to your computer and use it in GitHub Desktop.
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