[Mock3_4] runAsUser

유유·2023년 1월 31일
0

CKA

목록 보기
4/19

Create a Pod called non-root-pod , image: redis:alpinerunAsUser: 1000fsGroup: 2000

Pod non-root-pod fsGroup configured

Pod non-root-pod runAsUser configured

https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

piVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: non-root-pod
  name: non-root-pod
spec:
  securityContext:
    runAsUser: 1000
    fsGroup: 2000
  containers:
  - image: redis:alpine
    name: non-root-pod
    resources: {}
  dnsPolicy: ClusterFirst
  restartPolicy: Always
status: {}
profile
하이

0개의 댓글