2.4.4. Pod nginx ポリシー

Kubernetes 設定ポリシーコントローラーは、Pod nginx ポリシーのステータスを監視します。Pod ポリシーを適用し、Pod のコンテナールールを定義します。Nginx Pod は、クラスター内に存在している必要があります。

2.4.4.1. Pod nginx ポリシー YAML 構成

   apiVersion: policy.open-cluster-management.io/v1
   kind: Policy
   metadata:
     name: policy-pod
     namespace:
   spec:
     complianceType:
     remediationAction:
     namespaces:
       exclude:
       include:
     object-templates:
       - complianceType:
         objectDefinition:
           apiVersion:
           kind: Pod # nginx pod must exist
           metadata:
             name:
           spec:
             containers:
             - image:
               name:
               ports:
               - containerPort:
        ...