Set cluster security policy mode
set_cluster_security_policy_modeSwitch a cluster's pod-security policies between audit (violations are reported), enforce (violating pods are rejected at admission) and off (the Kyverno policy engine is uninstalled from the cluster; native pod security keeps observing in audit). Enforce can block deployments that violate the baseline - read get_cluster_policy_violations first and only enforce when the list is clean or every violation is understood. Off is for clusters whose control planes cannot afford the engine's admission webhook and reports controller; audit or enforce afterwards do not reinstall it. Committed to the GitOps repository and applied by the reconciler. Reversible between audit and enforce.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>"
},
"name": "set_cluster_security_policy_mode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | audit, enforce or off. | |
| cluster_id | No | Cluster id (UUID). Optional when the conversation is bound to a cluster. |