安装带有helm的实例代理失败



kubectl get ns给出以下命名空间

communication-prod   Active   69d
custom-metrics       Active   164d
default              Active   218d
kube-node-lease      Active   218d
kube-public          Active   218d
kube-system          Active   218d
notification         Active   191d
notification-stock   Active   118d

但是,当我运行以下helm命令

helm install instana-agent 
--repo https://agents.instana.io/helm 
--namespace instana-agent 
--create-namespace 
--set agent.key=foo
--set agent.downloadKey=bar 
--set agent.endpointHost=ingress-green-saas.instana.io 
--set agent.endpointPort=443 
--set cluster.name='communication-engine-prod' 
--set zone.name='asia-south1' 
instana-agent

我得到以下错误

Error: INSTALLATION FAILED: rendered manifests contain a resource that already 
exists. Unable to continue with install: ClusterRole "instana-agent" in namespace "" 
exists and cannot be imported into the current release: invalid ownership metadata; label 
validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; 
annotation validation error: missing key "meta.helm.sh/release-name": must be set to
"instana-agent"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "instana-agent"

谁能告诉我为什么我可能会得到错误?

看起来您使用kubectl安装了代理,然后在尝试helm之前删除了名称空间。您需要删除在第一次安装尝试中创建的所有资源。最简单的方法是:

kubectl delete -f configuration.yaml

使用与安装代理时相同的配置文件(如果没有修改,也可以从Instana仪表板生成一个新配置文件)。您还可以使用kubectl get clusterroleskubectl get clusterrolebindings来获取需要使用kubectl delete删除的实体

我在尝试使用Instana操作符安装时遇到了类似的问题。我必须清理自定义资源,如instana-agent,clusterroleclusterrolebinding。代理成功实例化。

最新更新