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 clusterroles
和 kubectl get clusterrolebindings
来获取需要使用 kubectl delete
删除的实体
关于google-cloud-platform - 使用 helm 安装 instana 代理失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72481357/