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

sealos add can not visit network #5355

Open
allran opened this issue Jan 20, 2025 · 0 comments
Open

sealos add can not visit network #5355

allran opened this issue Jan 20, 2025 · 0 comments
Labels
kind/bug Something isn't working

Comments

@allran
Copy link

allran commented Jan 20, 2025

Sealos Version

v5.0.1

How to reproduce the bug?

  1. 先通过sealos run 安装的master1及node1, 正常运行。
sealos run registry.cn-shanghai.aliyuncs.com/labring/kubernetes:v1.30.5 \
registry.cn-shanghai.aliyuncs.com/labring/helm:v3.16.2 \
registry.cn-shanghai.aliyuncs.com/labring/cilium:v1.15.8 \
--masters 10.100.0.1 \
--nodes 10.100.0.11 \
--user root \
--passwd abcd1234
  1. 在node1节点上一个pod里面也可正常访问网络。
root@node1:~# kubectl exec -it 678a3ac94db887506c4d9fa0  -n xd -- /bin/sh
Defaulted container "app" out of: app, lifecycle-sidecar
/app # ping www.baidu.com
PING www.baidu.com (110.242.68.3): 56 data bytes
64 bytes from 110.242.68.3: seq=0 ttl=43 time=13.281 ms
64 bytes from 110.242.68.3: seq=1 ttl=43 time=12.461 ms
64 bytes from 110.242.68.3: seq=2 ttl=43 time=12.353 ms
64 bytes from 110.242.68.3: seq=3 ttl=43 time=12.365 ms
^Z[1]+  Stopped                    ping www.baidu.com
/app # exit
You have stopped jobs.
/app # exit
root@node1:~# ping www.baidu.com
PING www.a.shifen.com (110.242.69.21) 56(84) bytes of data.
64 bytes from 110.242.69.21 (110.242.69.21): icmp_seq=1 ttl=45 time=13.0 ms
64 bytes from 110.242.69.21 (110.242.69.21): icmp_seq=2 ttl=45 time=12.7 ms
64 bytes from 110.242.69.21 (110.242.69.21): icmp_seq=3 ttl=45 time=12.5 ms
64 bytes from 110.242.69.21 (110.242.69.21): icmp_seq=4 ttl=45 time=12.5 ms
^Z
[1]+  Stopped                 ping www.baidu.com
root@node1:~# 

问题:然后通过sealos add --nodes 10.100.0.13 添加新的节点,发现里面创建的pod不能访问网络, 但节点本身可访问网络。

root@node3:~# kubectl exec -it 6788b47bd5b570fe47ef8b0e  -n xd -- /bin/sh
Defaulted container "app" out of: app, lifecycle-sidecar
/app # ping www.baidu.com
^Z[1]+  Stopped                    ping www.baidu.com
/app # exit
You have stopped jobs.
/app # exit
root@node3:~# 
root@node3:~# ping www.baidu.com
PING www.a.shifen.com (180.101.50.242) 56(84) bytes of data.
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=1 ttl=47 time=11.3 ms
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=2 ttl=47 time=11.3 ms
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=3 ttl=47 time=11.3 ms
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=4 ttl=47 time=11.3 ms
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=5 ttl=47 time=11.3 ms
^Z
[5]+  Stopped                 ping www.baidu.com
root@node3:~# 

以下是pod信息:

root@master1:~# kubectl get pods -o wide -A
NAMESPACE     NAME                               READY   STATUS    RESTARTS          AGE     IP            NODE      NOMINATED NODE   READINESS GATES
kube-system   cilium-2s2h4                       1/1     Running   4 (5d10h ago)     5d10h   10.100.0.1    master1   <none>           <none>
kube-system   cilium-6g7lm                       1/1     Running   0                 5d10h   10.100.0.11   node1     <none>           <none>
kube-system   cilium-djjgr                       1/1     Running   0                 16h     10.100.0.12   node2     <none>           <none>
kube-system   cilium-dtcmn                       1/1     Running   0                 16h     10.100.0.13   node3     <none>           <none>
kube-system   cilium-operator-5dccd84bff-f7jhc   1/1     Running   0                 5d10h   10.100.0.11   node1     <none>           <none>
kube-system   coredns-55cb58b774-4x4xz           1/1     Running   0                 5d10h   10.0.0.215    node1     <none>           <none>
kube-system   coredns-55cb58b774-f558l           1/1     Running   0                 5d10h   10.0.0.106    node1     <none>           <none>
kube-system   etcd-master1                       1/1     Running   0                 5d10h   10.100.0.1    master1   <none>           <none>
kube-system   kube-apiserver-master1             1/1     Running   0                 5d10h   10.100.0.1    master1   <none>           <none>
kube-system   kube-controller-manager-master1    1/1     Running   0                 5d10h   10.100.0.1    master1   <none>           <none>
kube-system   kube-proxy-284zd                   1/1     Running   0                 23h     10.100.0.12   node2     <none>           <none>
kube-system   kube-proxy-gmtkj                   1/1     Running   0                 5d10h   10.100.0.1    master1   <none>           <none>
kube-system   kube-proxy-n688p                   1/1     Running   0                 22h     10.100.0.13   node3     <none>           <none>
kube-system   kube-proxy-zkcl7                   1/1     Running   0                 5d10h   10.100.0.11   node1     <none>           <none>
kube-system   kube-scheduler-master1             1/1     Running   0                 5d10h   10.100.0.1    master1   <none>           <none>
kube-system   kube-sealos-lvscare-node1          1/1     Running   0                 5d10h   10.100.0.11   node1     <none>           <none>
kube-system   kube-sealos-lvscare-node2          1/1     Running   0                 23h     10.100.0.12   node2     <none>           <none>
kube-system   kube-sealos-lvscare-node3          1/1     Running   0                 22h     10.100.0.13   node3     <none>           <none>
xd          6788a6ead5b570fe47ef8b0d           2/2     Running   10 (2m35s ago)    18h     10.0.0.11     node1     <none>           <none>
xd          6788b47bd5b570fe47ef8b0e           2/2     Running   2 (8h ago)        16h     10.0.3.78     node3     <none>           <none>
root@master1:~# 

What is the expected behavior?

No response

What do you see instead?

No response

Operating environment

- Sealos version:
- Docker version:
- Kubernetes version:
- Operating system:
- Runtime environment:
- Cluster size:
- Additional information:

Additional information

No response

@allran allran added the kind/bug Something isn't working label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant