检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
volumes: - name: cache-volume hostPath: path: /tmp # directory location on host - name: demo-vol emptyDir: {} 父主题: 使用策略定义库
cache-volume readOnly: true volumes: - name: cache-volume hostPath: path: /tmp # directory location on host 父主题: 使用策略定义库
opa image: openpolicyagent/opa:latest args: - "run" - "--server" - "--addr=localhost:8080" 父主题: 使用策略定义库
rbac.authorization.k8s.io kind: Group name: system:authenticated - apiGroup: rbac.authorization.k8s.io kind: Group name: system:unauthenticated 父主题: 使用策略定义库
spec: hostNetwork: true containers: - name: nginx image: nginx ports: - containerPort: 9001 hostPort: 9001 父主题: 使用策略定义库
capabilities: add: ["disallowedcapability"] resources: limits: cpu: "100m" memory: "30Mi" 父主题: 使用策略定义库
app: nginx-automountserviceaccounttoken spec: automountServiceAccountToken: true containers: - name: nginx image: nginx 父主题: 使用策略定义库
containers: - name: policy-test image: ubuntu command: - /bin/bash - -c - sleep 99999 父主题: 使用策略定义库
labels: app: nginx-privileged spec: containers: - name: nginx image: nginx securityContext: privileged: true 父主题: 使用策略定义库
run" - "--server" - "--addr=localhost:8080" resources: limits: memory: "2Gi"k8sexternalips 父主题: 使用策略定义库
nginx-readonlyrootfilesystem spec: containers: - name: nginx image: nginx securityContext: readOnlyRootFilesystem: false 父主题: 使用策略定义库
securityContext: seLinuxOptions: level: s1:c234,c567 user: sysadm_u role: sysadm_r type: svirt_lxc_net_t 父主题: 使用策略定义库
labels: app: nginx-proc-mount spec: containers: - name: nginx image: nginx securityContext: procMount: Unmasked 父主题: 使用策略定义库
container.apparmor.security.beta.kubernetes.io/nginx: unconfined labels: app: nginx-apparmor spec: containers: - name: nginx image: nginx 父主题: 使用策略定义库
metadata: name: my-service-disallowed spec: type: LoadBalancer ports: - port: 80 targetPort: 80 nodePort: 30007 父主题: 使用策略定义库
rules: - apiGroups: - apps resources: - endpoints verbs: - create - delete - deletecollection - patch - update 父主题: 使用策略定义库
image: busybox command: [ "sh", "-c", "sleep 1h" ] volumeMounts: - name: fsgroup-demo-vol mountPath: /data/demo 父主题: 使用策略定义库
apiVersion: v1 kind: Namespace metadata: name: disallowed-namespace 父主题: 使用策略定义库
Service metadata: name: disallowed-service spec: ports: - name: http port: 80 targetPort: 8080 selector: app: foo 父主题: 使用策略定义库
metadata: name: my-service-disallowed spec: type: NodePort ports: - port: 80 targetPort: 80 nodePort: 30007 父主题: 使用策略定义库