gpt4 book ai didi

spring - 库伯内斯 : Service Accounts Permissions issue with Spring Cloud Data Flow Server

转载 作者:行者123 更新时间:2023-12-02 11:35:48 26 4
gpt4 key购买 nike

我一直在尝试使用 minikube 在本地为 Kubernetes 设置 Spring Cloud Dataflow Server。已按照此处链接中的安装说明进行操作:SCDF Installation Reference

SCDF 服务器出现以下错误:


11:32:52.095 [main] DEBUG io.fabric8.kubernetes.client.Config - Trying to configure client namespace from Kubernetes service account namespace path...
11:32:52.096 [main] DEBUG io.fabric8.kubernetes.client.Config - Found service account namespace at: [/var/run/secrets/kubernetes.io/serviceaccount/namespace].
2018-04-24 11:33:14.348 WARN 1 --- [ main] o.s.cloud.kubernetes.StandardPodUtils : Failed to get pod with name:[scdf-server-869d56967c-97lsd]. You should look into this if things aren't working as you expect. Are you missing serviceaccount permissions?

io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://kubernetes.default.svc/api/v1/namespaces/default/pods/scdf-server-869d56967c-97lsd. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. pods "scdf-server-869d56967c-97lsd" is forbidden: User "system:serviceaccount:default:default" cannot get pods in the namespace "default".

版本详情如下:

  • Spring Cloud 数据流服务器:1.4.0.RELEASE
  • 使用 minikube 的 Kubernetes 本地部署
  • Kubernetes 版本:1.10

最佳答案

minikube 的最新版本默认启用了 RBAC。

对于启用 RBAC 的集群,我们在安装部分添加了关于此事的注释。

“最新版本的 kubernetes 已经在 api-server 上启用了 RBAC。如果您的目标平台启用了 RBAC,您必须要求集群管理员在部署数据流服务器之前为您创建角色和角色绑定(bind)。他们将数据流服务帐户与其运行所需的角色相关联。”

但是,对于 minikube,您可以运行以下命令并重试安装。

kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default

或者,如果您使用的是 helm-chart,则可以禁用 RBAC 并在 minikube 上安装带有以下内容的图表。

helm init

helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com

helm repo update

helm install --name my-release --set server.service.type=NodePort --set rbac.create=false incubator/spring-cloud-data-flow

关于spring - 库伯内斯 : Service Accounts Permissions issue with Spring Cloud Data Flow Server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50002213/

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