You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法在Argo CD中添加额外的kind集群

Kind集群添加到Argo CD时出现连接拒绝问题

本地运行两个Kind集群,分别为dev-cluster和kind,Argo CD部署在dev-cluster上。执行argocd cluster add kind-kind --name stage命令将kind集群添加到Argo CD时,出现连接拒绝错误。

初始命令执行错误信息

WARNING: This will create a service account `argocd-manager` on the cluster referenced by context `kind-kind` with full cluster level privileges. Do you want to continue [y/N]? y
INFO[0005] ServiceAccount "argocd-manager" already exists in namespace "kube-system" 
INFO[0005] ClusterRole "argocd-manager-role" updated    
INFO[0005] ClusterRoleBinding "argocd-manager-role-binding" updated 
FATA[0005] rpc error: code = Unknown desc = Get "https://127.0.0.1:45249/version?timeout=32s": dial tcp 127.0.0.1:45249: connect: connection refused

当前kubectl上下文配置

执行kubectl config get-contexts输出:

CURRENT   NAME               CLUSTER            AUTHINFO           NAMESPACE
*         kind-dev-cluster   kind-dev-cluster   kind-dev-cluster   
          kind-kind          kind-kind          kind-kind          

已尝试的解决方法及结果

  • 端口转发方案:
    执行端口转发命令:
kubectl port-forward kube-apiserver-kind-control-plane -n kube-system --context kind-kind 45249:45249

再次执行argocd cluster add命令,问题未解决,仍报连接拒绝。

  • 节点IP直连方案:
    先获取kind集群节点的内部IP:
kubectl get nodes -o wide --context kind-kind

输出:

NAME                 STATUS   ROLES           AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME
kind-control-plane   Ready    control-plane   42d   v1.25.0   172.18.0.3    <none>        Ubuntu 22.04.1 LTS   5.15.0-52-generic   containerd://1.6.7

使用节点IP执行添加命令:

argocd cluster add kind-kind --name stage --server 172.18.0.3:45249

错误信息:

WARNING: This will create a service account `argocd-manager` on the cluster referenced by context `kind-kind` with full cluster level privileges. Do you want to continue [y/N]? y
INFO[0001] ServiceAccount "argocd-manager" already exists in namespace "kube-system" 
INFO[0001] ClusterRole "argocd-manager-role" updated    
INFO[0001] ClusterRoleBinding "argocd-manager-role-binding" updated 
FATA[0001] Failed to establish connection to 172.18.0.3:45249: dial tcp 172.18.0.3:45249: connect: connection refused 

上述两种方法均未解决问题,依然出现连接拒绝错误。

内容的提问来源于stack exchange,提问作者Pratheesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.14 01:55:18