kubernetes - Istio 虚拟服务创建访问被拒绝

标签 kubernetes istio istio-gateway istio-operator

我正在尝试创建一个 Istio Virtualservice。但是,尽管我绑定(bind)了 cluster-admin 角色,但我还是收到以下错误。

UPGRADE FAILED: could not get information about the resource: virtualservices.networking.istio.io "admin-ui" is forbidden: User "vaish@admin" cannot get resource "virtualservices" in API group "networking.istio.io" in the namespace "onboarding"

我还尝试如下创建一个新的 Clusterrole 并创建一个绑定(bind)到我的用户,这也没有产生任何结果。

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:  
  name: istio-editor-role
  labels:
    rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups: ["config.istio.io", "networking.istio.io", "rbac.istio.io", "authentication.istio.io", "security.istio.io"]
  resources: ["virtualservices"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"
 kubectl create clusterrolebinding istio-editor-binding --clusterrole=istio-editor-role --user=vaish@admin

最佳答案

解决方案是将用户添加到 cluster-admin 角色

关于kubernetes - Istio 虚拟服务创建访问被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69728899/

相关文章:

docker - 什么是最简单的合理Kubernetes设置?

azure - AKS ISTIO 网关无法访问

azure - 如何将 AKS 应用程序群集、节点、Pod、容器指标发送到 Log Analytics 工作区,以便在 Azure 监控中可用?

nginx - 如何根据 URL id 在 Istio 上设置哈希?

kubernetes - kubernetes动态pvc/监控使用情况

kubernetes - 如何在Kubernetes中修补ConfigMap

php - Nginx,PHP-FPM,PHP Module and MySQL Implementation is possible in Kubernetes

amazon-web-services - 我可以为由 Istio 配置的经典 AWS ELB 定义子域吗?

kubernetes - minikube 中服务的完全限定服务名称是什么

kubernetes - 如何配置 GKE 的 Istio 以限制导出?