Learn KOP - Block and Notify - Rafay Product Documentation

Part 2: Block

This is Part 2 of the exercise that will focus on using the "Block & Notify" drift detection setting within a custom blueprint to protect resources in the blueprint from being modified outside of the controlled blueprint version.


What Will You Do

In part 2, you will:


Step 1: Create Blueprint

In this step, we will create a new version for our previously created blueprint.

You will now see the new version.


Step 2: Apply Blueprint

In this step, we will apply the new blueprint version to the cluster.

The blueprint version will begin to be applied to the cluster.

The blueprint is now applied to the cluster.


Step 3: Modify Blueprint Resources

In this step, we will attempt to remove the monitoring resources on the cluster that were deployed by the blueprint. Since our blueprint drift detection is set to "Block & Notify", we will NOT be able to remove the monitoring resources.

kubectl get deployments -n rafay-infra

You will see several prometheus deployments that were deployed as part of the "Monitoring & Alerting" managed add-on within the blueprint.

We will now attempt to delete one of these deployments.

kubectl delete deployments -n rafay-infra rafay-prometheus-adapter

We can see that we are not able to delete the deployment resource this time as it is blocked by the drift detection settings.


Step 4: View Audit Logs

In this step, we will review the system audit logs to view the drift on the system.

You will see the delete event that was previously attempted is logged and shows that the action was denied.


Recap

Congratulations! At this point, you have successfully set up a cluster blueprint with drift detection and blocked out of band changes to the blueprint resources.