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

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

符合策略实例的资源定义

示例中hostPath中pathPrefix以/foo开头,符合策略实例。

apiVersion: v1
kind: Pod
metadata:
  name: nginx-host-filesystem
  labels:
    app: nginx-host-filesystem-disallowed
spec:
  containers:
    - name: nginx
      image: nginx
      volumeMounts:
        - mountPath: /cache
          name: cache-volume
          readOnly: true
  volumes:
    - name: cache-volume
      hostPath:
        path: /foo/bar
support.huaweicloud.com/usermanual-ucs/ucs_01_0224.html