You can group specific rules in custom templates to reuse them across Kubernetes hardening policies. Custom templates are a combination of built-in rules and custom rules. They are applicable when you create a policy.

Note: You configure the Alert or Block action in the policy, but not in the template. Thus, you can have the same rule in different policies with different applied actions.

Procedure

  1. On the left navigation pane, click Enforce > K8s Policies.
  2. Click the Templates tab.
  3. Click Add Template.
  4. Enter the name for the custom template and click Save.
    The template is created and visible in the list of Custom Templates.
  5. To add rules to the newly created custom template, click Options > Edit template.
  6. Select the rules to add to the custom template.
  7. Click Save.