gpt4 book ai didi

kubernetes - 不支持的值 : "rbac.authorization.k8s.io"

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

当我尝试

kubectl create -f cloudflare-argo-rolebinding.yml

这个角色绑定(bind)
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cloudflare-argo-rolebinding
namespace: default
subjects:
- kind: ServiceAccount
name: cloudflare-argo
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: cloudflare-argo-role
apiGroup: rbac.authorization.k8s.io

我收到此错误:
The RoleBinding "cloudflare-argo-rolebinding" is invalid: subjects[0].apiGroup: Unsupported value: "rbac.authorization.k8s.io": supported values: ""

任何的想法 ?如果有帮助,我会在 DigitalOcean 上使用他们的新 Kubernetes 服务。

最佳答案

我认为问题是使用错误 apiGroup .

kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cloudflare-argo-rolebinding
namespace: default
subjects:
- kind: ServiceAccount
name: cloudflare-argo
# apiGroup is ""(core/v1) for service_account
apiGroup: ""
roleRef:
kind: Role
name: cloudflare-argo-role
apiGroup: rbac.authorization.k8s.io

关于kubernetes - 不支持的值 : "rbac.authorization.k8s.io",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53050611/

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