Creating a Cluster Policy Using Legacy Policy Method
Prerequisites
- Ensure CA integration is completed.
- Ensure you configured organization PKI standards as CA Policy.
- Ensure the Group is created.
Creating a Legacy Cluster Policy
-
Go to > > >
The Cluster Policy page is displayed. This page is a holistic inventory of all the cluster policies created.
-
Click +Create Policy in the command bar.
The Cluster Policy popup window opens.
- Under the Legacy Policy section, click +Create Policy.
-
Enter/select the Policy Details.
Table 1. Policy Details - Field and Description Table Field Description Policy Name* Enter a unique policy name to be associated with one or more clusters. Policy Scope* From the dropdown list, from the following enforcement scope options, select the cluster policy type: - Cluster Wide
A cluster-wide policy applies to everything in the cluster, across all namespaces.
- Namespace Specific
A namespace-specific policy applies only to a particular namespace (a logical partition within the cluster).
Description Enter [optional] additional details related to the policy for clarity and reference. *: Mandatory fields - Cluster Wide
-
To configure the CA Issuer that will be used for certificate issuance for
the cluster, enter the corresponding CA Details to create a CA
setting.
To do this:
-
To exclude namespaces from the cluster policy, under Discovery
Settings, from the Namespace Exclusion dropdown list, select
the name/regex for the required namespaces.
The selected namespaces will be excluded from certificate discovery. The server certificate inventory will also not display any certificates discovered from the excluded namespaces.
Once the discovery settings for a cluster policy have been configured, you can choose how you want to map this policy to clusters/namespaces. There are two ways to do this mapping: manual and automatic.
To automatically map this cluster policy to specific clusters/namespaces, proceed to the next step, in which you can configure the automatic policy assignment rules.
To manually map cluster policies to clusters/namespaces, skip the automated assignment rules configuration, save the policy configured, and for further instructions, see Manually Mapping Cluster Policies to Clusters/Namespaces.
-
To
automatically map this cluster policy to specific clusters/namespaces,
configure the Automated Assignment Rules for this cluster
policy.
When an automated assignment rule is configured, this cluster policy will be automatically assigned to the existing clusters/namespaces that match the defined patterns. That is, the existingYAML configuration will be automatically pushed to those clusters.
If a cluster/namespace with a matching pattern is created after the automated assignment rule is created, the rule still applies and the YAML configuration of the cluster policy will be automatically pushed to the new cluster/namespace.
Note: The cluster policy mapping rules have been migrated from the Rules module in KUBE to the Cluster Policy module to enable creating rules for automatically mapping cluster policies to clusters/namespaces at the time of policy creation. -
Click Save.
The cluster policy is added to the Cluster Policy inventory.
Manually Mapping Cluster Policies to Clusters/Namespaces
-
From the Cluster Policy inventory, for the policy that has to be
mapped, select the corresponding checkbox.
Note: Only one policy can be mapped at a time.
-
Click
.
The Add Endpoints dialog box is displayed, with the Policy Name and Policy Type auto-populated based on the policy selected in the previous step. -
In the Add Endpoints dialog box:
- Click Add.
-
For the cluster policy you want to map, from the Manage and Deploy
field in the cluster inventory, click
.
The Cluster Policy > Cluster Policy Manage and Deploy page is displayed. -
Select the checkbox corresponding to the policy and click
.
The Cluster Push Policy dialog box is displayed. -
In the Cluster Push Policy dialog box, enter a comment related to
the policy mapping and click Push.
The cluster policy will be mapped to the selected cluster/namespace.
Automatically Mapping Cluster Policies to Clusters/Namespaces
When an automated assignment rule is configured, this cluster policy will be automatically assigned to the existing clusters/namespaces that match the defined patterns. That is, the existingYAML configuration will be automatically pushed to those clusters.
If a cluster/namespace with a matching pattern is created after the automated assignment rule is created, the rule still applies and the YAML configuration of the cluster policy will be automatically pushed to the new cluster/namespace.
