首页 > 解决方案 > 如何在 Kubernetes 中为 statefulsets 资源设置适当的权限?

问题描述

我在 minishift 上运行 Instana 代理。我看到这些日志:

 oc logs -f pod/instana-agent-dg5lt

2020-05-26T03:10:58.763+00:00 | 警告 | nstana-sensor-scheduler-thread-1 | Kubernetes | com.instana.sensor-kubernetes - 1.2.106 | Instana 代理无权监视 statefulsets 更改。没有此权限,Kubernetes 传感器将无法正常工作。请确保statefulsets资源的适当权限。

如何在 Kubernetes 中为 statefulsets 资源设置适当的权限?

编辑

我使用了 2 个 yaml 文件。我使用此 yaml 文件按原样安装操作员同上,没有任何更改:https ://github.com/instana/instana-agent-operator/releases/latest/download/instana-agent-operator.yaml

我使用这个自定义资源 yaml 文件https://github.com/instana/instana-agent-operator/blob/master/deploy/instana-agent.customresource.yaml只做了两个更改:我size: 1在规范键下添加并替换replace-me为正确的代理密钥。

编辑2

oc api-resources就是这样创建项目和部署定义文件的。结果可以在这里找到-> https://pastebin.com/A6zRRReS

标签: kubernetesopenshiftminishiftinstana

解决方案


推荐阅读