Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ktctl connect命令连接k8s集群,会添加额外的路由规则导致原本的服务访问不了 #437

Open
liqiao7 opened this issue Jul 5, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@liqiao7
Copy link

liqiao7 commented Jul 5, 2023

1688547910619

环境描述:
134.160.180.70 haproxy+keepalived搭建的虚拟ip
134.160.180.71 master1
134.160.180.72 master2
134.160.180.73 master3
134.160.180.74 node1
134.160.180.75 node2
134.160.180.76 node3
134.160.180.80 gitlab

问题描述:
如果所示,使用命令ktctl connect --kubeconfig ./70kubeconfig连接k8s集群时,会输出如下日志

5:03PM INF Adding route to 134.160.180.128/25
5:03PM INF Adding route to 134.160.180.0/26
5:03PM INF Adding route to 134.160.180.96/27
5:03PM INF Adding route to 134.160.180.80/28
5:03PM INF Adding route to 134.160.180.72/29
5:03PM INF Adding route to 134.160.180.64/30
5:03PM INF Adding route to 134.160.180.68/31
5:03PM INF Adding route to 134.160.180.71/32

其中134.160.180.80为另外一台服务器(部署了gitlab)的地址,使用ktctl连接成功后,无法访问该gitlab,可以ping通134.160.180.80这个ip,但是访问gitlab会出现404错误,关闭ktctl后,一切正常。

貌似是因为这个ip被路由到别的地方去了,这个是在哪可以进行配置吗?或者说有办法不让这个ip添加到路由当中吗?

@liqiao7 liqiao7 added the enhancement New feature or request label Jul 5, 2023
@wangxiaodao1990
Copy link

解决了?

@liqiao7
Copy link
Author

liqiao7 commented Jul 7, 2023

解决了?

目前还没有呢,用gitlab时就把ktctl给关了

@dayu521
Copy link

dayu521 commented Jul 25, 2023

ktctl connect --kubeconfig ./70kubeconfig --excludeIps 134.160.180.80/28

在后面加上这个应该就好了

@yearnxiao
Copy link

这是什么牛逼公司,集群所有节点都用公网IP连接通讯

@liqiao7
Copy link
Author

liqiao7 commented Aug 21, 2023

这是什么牛逼公司,集群所有节点都用公网IP连接通讯

这是我们的内网ip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants