Kubernetes集群(Debian10)在安装GitLab Kubernetes代理安装程序时无法连接GitLab.



我需要从GitLab - container repo部署docker映像到我的kubernetes集群,但首先我们需要做GitLab kubernetes代理安装作为通过GitLab -ci部署的先决条件。这样cluster和gitlab就可以通信了

但post创建代理GitLab我跑的命令(安装gitlab-agent) GitLab现有kubernetes集群日志获得成功,但我注意到,集群不是连接到code.example.com GitLab由于连接错误("mod_name"reverse_tunnel"再次发送握手请求:";https://code.example.com/-/kubernetes-agent/":表盘tcp:查找code.example.com: I/o timeout")

任何人都可以建议解决方案,因为它似乎在客户端的网络级别的问题,集群是无法达到code.example.com我已经检查了kas_address包含一个尾斜杠,但仍然相同的连接错误。

gitlab代理故障排除:

https://aist.fh-hagenberg.at/git/help/user/clusters/agent/troubleshooting.md

* *

  • Gitlab命令示例:
  • * *

root@x12men12z: ~ $Helm repo添加gitlab https://charts.gitlab.ioHelm回购更新——install gitlab-agent gitlab/gitlab-agent
——namespace gitlab-agent
——create-namespace
——set config。token=abcxyzabcxyzabcxyzabcxyzabcxyzabcxyzabcxyz
——set config.kasAddress=ws://code.example.com/-/kubernetes-agent/

  • 日志错误:

root@x12men12z:~$ kubectl logs -f -l=app=gitlab-agent -n gitlab-agent{"level"error"time":"2022 - 06 - 02 - t12:08:25.818z","msg":"错误处理connection","mod_name":"reverse_tunnel","error":"Connect (): rpc错误:代码=用时desc =连接错误:desc ="交通:WebSocket拨号错误而拨号失败:无法发送握手请求:";https://code.example.com/-/kubernetes-agent/":表盘tcp: code.example.com查找:i/o timeout"}{"level";" warn", time";";GetConfiguration ";";msg";";GetConfiguration ";;GetConfiguration ";;error";rpc error: code =不可用desc =连接错误:desc = "transport:拨号到WebSocket失败时出错拨号:发送握手请求失败:Get "https://code.example.com/-/kubernetes-agent/":拨号tcp: lookup code.example.com: i/o timeout"}

@amit Thakur与我们在aws week集群中设置代理时遇到的错误相同。之后,我们将Kubernetes集群所在的VPC的NAT外部IP列入白名单,端口443在gitlab服务器端。然后我们没有任何这样的错误。

最新更新