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

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

不符合策略实例的资源定义

示例中hostNetwork设置成了true,但是端口未在指定范围内,不符合策略实例。

apiVersion: v1
kind: Pod
metadata:
  name: nginx-host-networking-ports-disallowed
  labels:
    app: nginx-host-networking-ports
spec:
  hostNetwork: true
  containers:
  - name: nginx
    image: nginx
    ports:
    - containerPort: 9001
      hostPort: 9001
support.huaweicloud.com/usermanual-ucs/ucs_01_0222.html