检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
nginx-disallowed spec: containers: - name: nginx image: nginx 父主题: 使用策略定义库
nginx-seccomp spec: containers: - name: nginx image: nginx 父主题: 使用策略定义库
配置MCI自动切流 自动切流概述 配置无条件触发自动切流 配置条件触发自动切流 父主题: 多集群Ingress
配置条件触发自动切流 本小节指导您配置条件触发自动切流,以识别集群CoreDNS功能故障并自动摘除流量。 为集群安装CPD组件识别集群 在配置自动切流前,您需要在集群中安装CPD(cluster-problem-detector)组件,以自动探测集群CoreDNS域名解析功能是否正常,并进行上报。
ports: - port: 80 targetPort: 80 nodePort: 30007 父主题: 使用策略定义库
volumeMounts: - name: fsgroup-demo-vol mountPath: /data/demo 父主题: 使用策略定义库
apiVersion: v1 kind: Namespace metadata: name: disallowed-namespace 父主题: 使用策略定义库
image: nginx securityContext: readOnlyRootFilesystem: false 父主题: 使用策略定义库
allowedSysctls:数组 forbiddenSysctls:数组 作用 约束PodSecurityPolicy中的“sysctls”字段不能使用的name。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中的forbiddenSysctls定义了sysctls中不能允许的名称。
- "run" - "--server" - "--addr=localhost:8080" 父主题: 使用策略定义库
cache-volume hostPath: path: /tmp # directory location on host 父主题: 使用策略定义库
# directory location on host - name: demo-vol emptyDir: {} 父主题: 使用策略定义库
authorization.k8s.io kind: Group name: system:unauthenticated 父主题: 使用策略定义库
本地集群配置文件 本地集群配置文件为一个Cluster.yaml文件,是在UCS 控制台中自动生成,用于初始化本地集群的master节点。表1是该文件内各个字段的说明。 表1 命令 配置项 配置命令 # ssh登录master节点用户 USERNAME: root # ssh登录master节点密码
true hostIPC: true containers: - name: nginx image: nginx 父主题: 使用策略定义库
"100m" memory: "1Gi" 不符合策略实例的资源定义 内存Limit超过最大值,不符合策略实例。 父主题: 使用策略定义库
requests: cpu: "100m" memory: "100Mi" 父主题: 使用策略定义库
ports: - port: 80 targetPort: 80 nodePort: 30007 父主题: 使用策略定义库
image: nginx securityContext: procMount: Unmasked 父主题: 使用策略定义库
nginx-apparmor spec: containers: - name: nginx image: nginx 父主题: 使用策略定义库