GKE Autopilot - 创建 Gatekeeper 约束时出错 - 与种类“K8sRequiredLabels”不匹配 - 确保首先安装 CRD

问题描述 投票:0回答:0

我正在尝试在 GKE-Autopilot 上设置网守并定义所需的约束。 (目前不使用 GCP 的政策控制器)。

约束模板已使用以下清单部署,并且可以成功列出/描述。 https://raw.githubusercontent.com/open-policy-agent/gatekeeper/master/demo/basic/templates/k8srequiredlabels_template.yaml

当尝试应用约束时,我收到错误消息“资源映射未找到名称:”k8srequiredlabels-sidercar“名称空间:”“来自”constraints / k8srequirelabels.yaml“:版本”constraints.gatekeeper“中的种类”K8sRequiredLabels“不匹配。 sh/v1beta1" 确保首先安装 CRD。

正如我提到的,所需的约束模板/CRD 已成功部署,这里可能是什么问题? 这个问题与所有约束模板有关。

期望约束部署成功。

kubernetes constraints google-kubernetes-engine
© www.soinside.com 2019 - 2024. All rights reserved.