【问题标题】:no matches for kind "ClusterRbacConfig" in version "rbac.istio.io/v1alpha1"版本“rbac.istio.io/v1alpha1”中的种类“ClusterRbacConfig”没有匹配项
【发布时间】:2019-12-17 23:20:30
【问题描述】:

我一直在努力完成https://istio.io/docs/tasks/security/authz-http/ 的第一步。使用以下文件,我应该在集群的默认命名空间上激活授权。

但是,当我运行以下脚本时:

apiVersion: "rbac.istio.io/v1alpha1"
kind: ClusterRbacConfig
metadata:
  name: default
spec:
  mode: 'ON_WITH_INCLUSION'
  inclusion:
    namespaces: ["default"]

这是网站上脚本的精确副本,我收到以下错误: error: unable to recognize "5-authorization/yaml-files/rbac-config-ON.yaml": no matches for kind "ClusterRbacConfig" in version "rbac.istio.io/v1alpha1".

除非 istio 的文档严重过时,并且 apiVersion 不再是正确的,否则我不知道是什么原因造成的。

【问题讨论】:

  • 全新安装的 Istio 1.2.3 似乎可以正常工作。你是如何安装 Istio 的?是否正确创建了 CRD?您可以通过运行以下命令验证 ClusterRbacConfig CRD 是否存在:kubectl get crd clusterrbacconfigs.rbac.istio.io
  • Istio 默认安装在 GKE 中,它使用 Istio 1.2.2,并且(显然)不包括 ClusterRbacConfig CRD。

标签: kubernetes google-cloud-platform istio rbac


【解决方案1】:

正如szymig 提到的,使用了错误版本的 Istio。 GKE 运行 1.2.2。

【讨论】:

    【解决方案2】:

    1.您可能以错误的方式安装了 Istio。如果使用 helm 安装 Istio,则需要先安装 CRD istio-crd

    所以只需检查它执行命令:

    $ kubectl get crd
    

    在 istio 命名空间中。

    确保您在此处定义了所有 CRD:istio-crd-definitions

    部署 istio.yaml 两次似乎有效。但是您必须在两次运行之间稍等片刻。

    如果正如 browning 所说,必须首先部署证书,那么它在第二次运行时工作是有道理的。

    【讨论】:

      猜你喜欢
      • 2021-06-27
      • 2021-12-21
      • 1970-01-01
      • 2019-08-11
      • 2020-03-04
      • 2021-11-14
      • 2022-07-07
      • 1970-01-01
      • 2021-11-21
      相关资源
      最近更新 更多