检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
推荐级别:L3 生效资源类型:Pod 参数:无 作用 限制PodSecurityPolicy中的“hostPID”和“hostIPC”字段。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper.sh/v1beta1
参数: exemptImages:字符串数组 作用 约束PodSecurityPolicy中的“readOnlyRootFilesystem”字段。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper.sh/v1beta1
memory:字符串 exemptImages:字符串数组 作用 限制容器必须设置CPU和内存Limit,并且小于设定的最大值。 策略实例示例 示例展示了匹配的对象的CPU最大为200m,内存最大为1G。 apiVersion: constraints.gatekeeper.sh/v1beta1
k8sallowedrepos 基本信息 策略类型:合规 推荐级别:L1 生效资源类型:Pod 参数: repos:字符串数组 作用 容器镜像必须以指定字符串列表中的字符串开头。 策略实例示例 以下策略实例定义容器镜像必须以“openpolicyagent/”开头。 apiVersion: constraints
与其他云服务的关系 华为云UCS为用户提供一个统一的集群服务管理平台,与周边服务的依赖关系如图1所示。 图1 UCS与其他服务关系 表1 UCS与其他服务的关系 服务名称 UCS与其他服务的关系 主要交互功能 云容器引擎 CCE UCS支持接管云容器引擎中的CCE集群、CCE T
exemptImages:字符串数组 作用 约束PodSecurityPolicy中的“allowPrivilegeEscalation”字段为false。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper
kinds: ["Pod"] excludedNamespaces: ["kube-system"] 符合策略实例的资源定义 Pod的automountServiceAccountToken字段设为false,符合策略实例。 apiVersion: v1 kind:
- "ingress-nginx-private" - "ingress-nginx-public" 符合策略实例的资源定义 Servie类型非LoadBalancer,符合策略实例。 apiVersion: v1 kind: Service metadata:
作用 约束PodSecurityPolicy中的“sysctls”字段不能使用的name。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中的forbiddenSysctls定义了sysctls中不能允许的名称。 apiVersion: constraints
生效资源类型:Pod 参数: exemptImages:字符串数组 作用 禁止PodSecurityPolicy中的“privileged”字段为true。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper.sh/v1beta1
生效资源类型:Service 参数: allowedIPs:字符串数组 作用 限制服务externalIP仅为允许的IP地址列表。 策略实例示例 服务的externalIP仅允许allowedIPs中定义的IP。 apiVersion: constraints.gatekeeper.sh/v1beta1
用户提供域名服务的DNS是什么?。 步骤二:更改域名的DNS服务器 域名的DNS服务器定义了域名用于解析的权威DNS服务器。 当通过云解析服务创建公网域名后,系统默认生成的NS类型记录集的值即为云解析服务的DNS服务器地址。 若域名的DNS服务器设置与NS记录集的值不符,则域名无
procMount:字符串 作用 约束PodSecurityPolicy中的“allowedProcMountTypes”字段。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中指定了procMount的值为Default。 apiVersion: constraints
参数: tags:字符串数组 exemptImages:字符串数组 作用 约束容器镜像tag。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,pararmeters中表示不允许容器镜像tag为latest。 apiVersion: constraints.gatekeeper
max_replicas: 整型 作用 要求具有“spec.replicas”字段的对象(Deployments、ReplicaSets等)在定义的范围内。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters定义范围为3到50。 apiVersion: constraints
ranges max: 整型 min: 整型 作用 控制PodSecurityPolicy中的“fsGroup”字段在限制范围内。 策略实例示例 以下策略实例展示了策略定义生效的资源类型。 apiVersion: constraints.gatekeeper.sh/v1beta1
pathPrefix: 字符串 作用 约束PodSecurityPolicy中的“hostPath”字段的参数。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中的allowedHostPaths指定了字段的值。 apiVersion: constraints.gatekeeper
runtime/default - docker/default 符合策略实例的资源定义 示例中的container.seccomp.security.alpha.kubernetes.io/nginx注解的value在设定的值列表中,符合策略定义。 apiVersion: v1 kind:
作用 约束PodSecurityPolicy中的allowedFlexVolumes字段类型。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters中的allowedFlexVolumes字段定义了允许的driver类型列表。 apiVersion: constraints
exemptImages:字符串数组 作用 约束AppArmor字段列表。 策略实例示例 以下策略实例展示了策略定义生效的资源类型,parameters的allowedProfiles字段定义了允许的值列表。 apiVersion: constraints.gatekeeper.sh/v1beta1