Repository navigation
Closed as not planned
Labels
Description
What is the issue?
I tried to use a private network created by Tailscale to build a cluster of k8s (Kubernetes).
Then, Tailscale running on two servers running worker nodes joined to the cluster started to consume an unnatural amount of network (tx 600Mbps) and CPU (80%, total 100%).
Why is this?
Log of tailscaled:
$ journalctl -fu tailscaled
3月 18 12:26:21 ... tailscaled[60693]: magicsock: disco: failed to send *disco.CallMeMaybe to 127.3.3.40:7: too many DERP packets queued; dropping
3月 18 12:26:27 ... tailscaled[60693]: Accept: UDP{100.97.160.100:32927 > 100.112.81.21:4789} 638 ok
3月 18 12:26:34 ... tailscaled[60693]: monitor: RTM_DELROUTE: src=, dst=fe80::/64, gw=, outif=59, table=254
3月 18 12:26:34 ... tailscaled[60693]: monitor: RTM_DELROUTE: src=, dst=fe80::/128, gw=, outif=59, table=255
3月 18 12:26:34 ... tailscaled[60693]: monitor: RTM_DELROUTE: src=, dst=fe80::ecee:eeff:feee:eeee/128, gw=, outif=59, table=255
3月 18 12:26:34 ... tailscaled[60693]: monitor: RTM_DELROUTE: src=, dst=ff00::/8, gw=, outif=59, table=255
3月 18 12:26:34 ... tailscaled[60693]: magicsock: endpoints changed: <CP Node IP>:53641 (stun), <CP Node IP>:41641 (stun4localport), 10.96.2.0:41641 (local), 10.244.55.193:41641 (local), 192.168.3.22:41641 (local), [<Some IPv6>]:41641 (local)
3月 18 12:26:34 ... tailscaled[60693]: magicsock: endpoints changed: <CP Node IP>:35358 (stun), <CP Node IP>:41641 (stun4localport), 10.96.2.0:41641 (local), 10.244.55.193:41641 (local), 192.168.3.22:41641 (local), [<Some IPv6>]:41641 (local)
3月 18 12:26:37 ... tailscaled[60693]: Accept: UDP{100.112.81.21:47872 > 100.97.160.100:4789} 638 ok out
3月 18 12:26:37 ... tailscaled[60693]: magicsock: disco: failed to send *disco.CallMeMaybe to 127.3.3.40:7: too many DERP packets queued; dropping
3月 18 12:26:47 ... tailscaled[60693]: Accept: UDP{100.112.81.21:33641 > 100.97.160.100:4789} 1278 ok out
3月 18 12:26:57 ... tailscaled[60693]: Accept: UDP{100.97.160.100:32927 > 100.112.81.21:4789} 638 ok
3月 18 12:26:58 ... tailscaled[60693]: magicsock: endpoints changed: <CP Node IP>:53641 (stun), <CP Node IP>:41641 (stun4localport), 10.96.2.0:41641 (local), 10.244.55.193:41641 (local), 192.168.3.22:41641 (local), [<Some IPv6>]:41641 (local)Steps to reproduce
- Prepare k8s' controle-plane node and tailscale.
- Prepare k8s' worker node and join it to controle-plane node.
Are there any recent changes that introduced the issue?
After the second worker node is joined, the problem occurs until tailscale is brought down on both nodes or k8s is reset.
OS
Linux
OS version
Rocky Linux 9.1
Tailscale version
1.38.1
Other software
- k8s (Kubernetes)
- Calico for CNI of k8s (The same phenomenon occurred in Cilium.)
Bug report
BUG-199680f3bb80e6faa12a6cecd7fcff3fe73ca0d9a45008c8bba874b857e9840c-20230318035813Z-819d637d6cc505ad
Reacted by Oji Ishimori
Activity
DentonGentry commentedon Mar 18, 2023
This sounds like a routing loop.
Are you using the Tailscale Kubernetes Operator, or a sidecar?
tasuren commentedon Mar 18, 2023
I heard that for first time. I'm going to see that.
Also, I found that if calico-node is not running at least one worker node, the problem is solved. (Although the network is only available on the worker node that is running.)
[-]Tailscale makes extensive use of networks.[/-][+]Kubernetes routing loop[/+][-]Kubernetes routing loop[/-][+]Kubernetes routing loop involving calico-node[/+]tasuren commentedon Mar 27, 2023
For now I have decided to use Tailscale in other parts of the system and WireGuard in the Kubernetes part.
Then the problem was solved.
Should I close this Issue?
K8SLIKE commentedon Mar 27, 2023
Kubernetes,calico-node Keep restarting?
tasuren commentedon Mar 27, 2023
No restarting.
net/interfaces: Don't send over Kubernetes network interfaces
ciffelia commentedon Aug 27, 2023
I have the same problem. My cluster uses Tailscale for communication between nodes (not pods) and Calico (VXLAN) for CNI.
Recently I noticed that Tailscale's CPU usage was frequently spiking and communication between nodes was becoming unstable, so I checked the logs and found the following message.
Bug report: BUG-9933ac6858348ab1ecd0a30a4e1ea9563e5a2c5da197d8b758c4b1cc51b14436-20230827064054Z-f455a54d6b409056
The CIDR of my cluster's pod network is
10.244.0.0/16. The fact that Tailscale is trying to communicate with other nodes through10.244.x.ysuggests that there is a loop between Tailnet and the pod network. In other words, packets sent from one node to another are first encapsulated by Tailscale, then by Calico, then by Tailscale, and so on.I think this problem can be solved if #1552 is implemented; I just need to exclude
10.244.0.0/16.ciffelia commentedon Oct 14, 2023
I built a software that limits network interfaces where tailscaled can send or receive packets. https://github.com/ciffelia/tsblock
knyar commentedon Nov 29, 2023
At this point this does seem like a duplicate of #1552, so I am going to close it.
morpig commentedon Nov 13, 2024
one year later, same exact issue (and not fixed.) thx for the repo @ciffelia!