[Mock2_2] sys_time

유유·2023년 2월 1일
0

CKA

목록 보기
12/19

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

Create a new pod called super-user-pod with image busybox:1.28. Allow the pod to be able to set system_time.

The container should sleep for 4800 seconds.

Pod: super-user-pod

Container Image: busybox:1.28

SYS_TIME capabilities for the conatiner?

k run super-user-pod --image=busybox:1.28 --dry-run=client -o yaml > suepr.yaml

apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: super-user-pod
  name: super-user-pod
spec:
  containers:
  - image: busybox:1.28
    securityContext:
      capabilities:
        add: ["NET_ADMIN", "SYS_TIME"]
    name: super-user-pod
    resources: {}
  dnsPolicy: ClusterFirst
  restartPolicy: Always
status: {}
profile
하이

0개의 댓글