This guide provides steps to create a policy and backup the mutatingwebhookconfiguration, using as an example HashCorp Vault app.
Kasten K10 provides the option to backup cluster-scoped resources. This enables non-spaced resources that are required for the application to be backed up and restored during a disaster recovery condition.
Steps to get the MutatingWebHookConfiguration details:
1. Details can be checked getting the output (yaml)
kubectl get mutatingwebhookconfiguration -o yaml
2. Following parameters that must be noted from the yaml for creating the policy.
- Group : admissionregistration.k8s.io
- Version: v1
- Resource: mutatingwebhookconfigurations ("s" added to the end since resource type must be in plural)
- Name: vault-agent-injector-svc (according to the app used in this example)
Creating the policy
- From the K10 dashboard create a normal policy for the application being backed up. Switch on the option "Snapshot Cluster-Scoped resources" and select "Filter Cluster-Scoped resources":
- Expand new options, "Include filters" will appear, that is where the parameters can be added:
- After adding all parameters, click "add filter" and change any other option as required for the environment. The policy should look like the image below:
- Execute the policy and after it completes, the resources backed up can be checked accessing the details on the right side panel:
The mutatingwebhookconfiguration was backed up with success as confirmed in the policy run details.
For more information about adding other cluster-scoped resources, please refer to our documentation at: https://docs.kasten.io/latest/usage/clusterscoped.html#snapshot-policies-for-application-and-cluster-scoped-resources