gpt4 book ai didi

Kubernetes 系统 :serviceaccount can't access service

转载 作者:行者123 更新时间:2023-12-02 02:54:10 25 4
gpt4 key购买 nike

我正在尝试关注 this tutorial设置 nginx-ingress Controller 。

好像是在RBAC完全集成到k8s之前写的。当我到达运行 nginx-controller.yaml 的最后一步时我收到授权错误:

no service with name default/default-http-backend found: services "default-http-backend" is forbidden: User "system:serviceaccount:default:default" cannot get services in the namespace "default"

我需要做什么才能使它与 RBAC 一起工作?

最佳答案

那个 hackernoon 帖子(像大多数帖子一样)是不正确的。具体来说,没有 RBAC 对象,并且没有为部署分配服务帐户(即:serviceAccountName: )。

为确保您创建了正确(或足够)的 RBAC 对象,请查看 https://github.com/mateothegreat/k8-byexamples-ingress-controller/tree/master/manifests 处的 RBAC-* 对象.

关于Kubernetes 系统 :serviceaccount can't access service,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50377271/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com