Stay organized with collections Save and categorize content based on your preferences.
Note: This document or section includes references to one or more terms that Google considers disrespectful or offensive. The terms are used because they are keywords in the software that's described in the document.The terms: whitelist
This document explains how to enable dry-run mode.
When you enable dry-run mode, Binary Authorization allows all container images to be deployed, even if those images violate the Binary Authorization policy. Policy compliance status messages are logged to Cloud Audit Logs. You can inspect the log to determine whether the images would have been disallowed and take corrective action. When the policy configuration works as you intend, you can disable dry-run mode to enable Binary Authorization enforcement; images that violate the policy are disallowed from being deployed.
You can set dry-run mode in the default rule or a specific rule.
Before you beginTo use dry-run mode, set up Binary Authorization for your platform.
Enable dry run Caution: Enabling dry run in your default admission rule, as shown, allows all container images to be deployed, even if they violate the deployment policy.To enable dry run, do the following:
ConsoleGo to the Binary Authorization page in the Google Cloud console.
Click Edit Policy.
In Default Rule or a specific rule, select Dry-run mode.
Note: To demonstrate dry-run mode, you can also set the rule to Disallow all images. With this setting, all images violate the policy, are disallowed from being deployed, and the violations are logged.Click Save Policy.
Export the Binary Authorization policy to a YAML file:
gcloud container binauthz policy export > /tmp/policy.yaml
In a text editor, set enforcementMode
to DRYRUN_AUDIT_LOG_ONLY
and save the file.
evaluationMode
to ALWAYS_DENY
. With this setting, all images violate the policy, are disallowed from being deployed, and the violations are logged.To update the policy, import the file by executing the following command:
gcloud container binauthz policy import /tmp/policy.yaml
To test dry-run mode, deploy images that violate the policy and then view dry-run mode events from Binary Authorization for GKE, Cloud Run, or Google Distributed Cloud.
Disable dry-run modeTo disable dry-run mode, update your policy as follows:
ConsoleGo to the Binary Authorization page in the Google Cloud console.
Click Edit Policy.
In Default Rule or a specific rule, clear Dry-run mode.
Click Save Policy.
Export the Binary Authorization policy:
gcloud container binauthz policy export > /tmp/policy.yaml
In a text editor, set enforcementMode
to ENFORCED_BLOCK_AND_AUDIT_LOG
and save the file.
To update the policy, import the file by executing the following command:
gcloud container binauthz policy import /tmp/policy.yaml
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Dry-run mode in Binary Authorization allows all container images to be deployed, regardless of policy violations, with policy compliance status logged in Cloud Audit Logs."],["Enabling dry-run mode can be done either through the Google Cloud console or via the `gcloud` command-line tool, by modifying the Binary Authorization policy settings."],["You can test dry-run mode by deploying images that violate the policy and then viewing the logged events for GKE, Cloud Run, or Google Distributed Cloud."],["Dry-run mode can be disabled by updating the Binary Authorization policy in the Google Cloud console or through the `gcloud` command-line tool, switching to enforced mode that blocks and logs violations."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4