检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
exemptImages:字符串数组 作用 约束PodSecurityPolicy中的“readOnlyRootFilesystem”字段。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper.sh/v1beta1 kind:
复杂场景 某用户通过UCS服务管理华为云集群和本地集群,其使用时间轴见图1。 图1 使用时间轴 具体操作如下: 该用户于2023/06/15 08:00:00成功接入集群,接入集群规模为:华为云集群40 vCPU,本地集群10 vCPU 该用户于2023/06/15 08:30:
布尔值 pathPrefix: 字符串 作用 约束PodSecurityPolicy中的“hostPath”字段的参数。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中的allowedHostPaths指定了字段的值。 apiVersion: constraints
allowedFlexVolumes:数组 作用 约束PodSecurityPolicy中的allowedFlexVolumes字段类型。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中的allowedFlexVolumes字段定义了允许的driver类型列表。 apiVersion:
allowedUsers:数组 作用 拒绝白名单外的资源更新ServiceAccount。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中定义了允许的组列表allowedGroups和允许的用户列表allowedUsers。 # IMPORTANT: Before deploying
命名空间 命名空间(Namespace)是对集群中一组资源和对象的抽象整合,可通过集群资源配额实现多个用户之间的资源划分,适用于多个团队或项目共享一个集群资源的场景。 创建命名空间 登录UCS控制台,在左侧导航栏中选择“容器舰队”。 在“容器舰队”页签下找到已开通集群联邦的舰队,单击名称进入详情页。
min: 整型 作用 约束PodSecurityPolicy中的“hostNetwork”和“hostPorts”字段。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中hostNetwork为true时,使用的端口必须在指定的端口范围内。 apiVersion:
forbiddenSysctls:数组 作用 约束PodSecurityPolicy中的“sysctls”字段不能使用的name。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中的forbiddenSysctls定义了sysctls中不能允许的名称。 apiVersion:
exemptImages:字符串数组 作用 约束PodSecurityPolicy中的“allowPrivilegeEscalation”字段为false。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper.sh/v1beta1 kind:
procMount:字符串 作用 约束PodSecurityPolicy中的“allowedProcMountTypes”字段。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中指定了procMount的值为Default。 apiVersion: constraints
生效资源类型:Pod 参数: allowedProfiles:数组 exemptImages:字符串数组 作用 约束AppArmor字段列表。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters的allowedProfiles字段定义了允许的值列表。 apiVersion:
参数: probes:数组 probeTypes:数组 作用 要求Pod具有Readiness或Liveness Probe。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters展示了probes的类型和probeTypes。 apiVersion: constraints
max: 整型 min: 整型 作用 控制PodSecurityPolicy中的“fsGroup”字段在限制范围内。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper.sh/v1beta1 kind:
memory requests: - cpu - memory 符合策略实例的资源定义 已经配置内存的Limit,CPU和内存的Request,符合策略实例。 apiVersion: v1 kind: Pod metadata: name: opa-allowed
allowedRegex: "^[a-zA-Z]+.agilebank.demo$" 符合策略实例的资源定义 示例包含策略实例中定义的label,符合策略实例。 apiVersion: v1 kind: Namespace metadata: name: allowed-namespace
type、user四个字符串对象 exemptImages:字符串数组 作用 约束Pod定义SELinux配置的允许列表。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中的allowedSELinuxOptions定义了参数的允许列表。 apiVersion:
安装本地集群 安装前检查 安装前准备(私网接入) 安装及验证 父主题: 本地集群
服务网关 服务网关概述 网关实例 网关路由 网关证书 父主题: 服务网格
faultrole策略定义禁止该ClusterRole对Endpoints进行create、patch和update操作。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper.sh/v1beta1 kind:
“seccomp.security.alpha.kubernetes.io/allowedProfileNames”注解。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中allowedProfiles定义了允许的注解。 apiVersion: constraints