AKS允许使用的集装箱映像内置策略是什么正则模式?

发布于 2025-01-29 20:41:43 字数 329 浏览 5 评论 0原文

我正在使用AKS群集。我启用了策略附加功能。并已分配了具有定义名称的内置策略 kubernetes群集容器只能

在分配过程中使用允许的映像,我将允许的正格模式包含在 ^。+mcr.mcr.mcr.mcr.mcr.mcr.mcr.mcr.mcr.mcr.mcr.mcr.mcr.mcr。 .com /.+$ 这是我包含在pod yaml“ mcr.microsoft.com/v2/mcr/hello-world/tags/list”中的图像来源。由于我不熟悉Regex模式,因此请帮助我使用正确的输入。

I am using the AKS cluster. I have enabled the Policy add-on feature. And have assigned the built-in policy with definition name Kubernetes cluster containers should only use allowed images

During the assignment, I have included the allowed regex pattern as ^.+mcr.microsoft.com/.+$
This is the image source I have included in my Pod YAML "mcr.microsoft.com/v2/mcr/hello-world/tags/list" But it gets denied. Since I am not familiar with the Regex pattern kindly help me to use the right input.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撞了怀 2025-02-05 20:41:43

从模式中删除第一个。+。因此,^mcr.microsoft.com \/。+$

这意味着图像名称实际上完全以“ mcr.microsoft.com ...”开头。

Remove the first .+ from your pattern. So ^mcr.microsoft.com\/.+$

This means that the image name actually starts exactly with "mcr.microsoft.com..."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文