Skip to main content

Enforce Ingress Policy

After validating the potential impact of your policy and analyzing the results, you can make changes to the policy you want to deploy or to the configuration of your cluster before you are ready to start enforcing a policy. Once you are satisfied with the pre-deployment validation results, you can enforce the policy by clicking the Publish icon.

To enforce a policy:

  1. Change the Ingresses: Restrict Hostnames rule from Monitor to Enforce and then click Publish changes in the top section of the right pane.

  2. Confirm enforcement by clicking Publish changes.

  3. Try to recreate the ingress initechby deleting the existing one and creating it again with the following commands.

    • Delete ingress initech: kubectl delete ingress initech.

    • Create ingress initech: kubectl apply ingress initech.

  4. Verify the error message from the API server saying that this new ingress conflicts with the other two.