华为云UCS-k8spspfsgroup:不符合策略实例的资源定义

时间:2024-09-12 15:06:02

不符合策略实例的资源定义

示例中fsGroup设为了2000,不符合策略实例。

apiVersion: v1
kind: Pod
metadata:
  name: fsgroup-disallowed
spec:
  securityContext:
    fsGroup: 2000   # directory will have group ID 2000
  volumes:
  - name: fsgroup-demo-vol
    emptyDir: {}
  containers:
  - name: fsgroup-demo
    image: busybox
    command: [ "sh", "-c", "sleep 1h" ]
    volumeMounts:
    - name: fsgroup-demo-vol
      mountPath: /data/demo
support.huaweicloud.com/usermanual-ucs/ucs_01_0225.html