-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
tailscale-operator not working on AKS #8111
Comments
@rodrigc Awesome! Thanks for the links. I'm gonna do some reading up on those, and report back here with my findings |
@tiesmaster Exact same issue with AKS and tailscale proxy |
@wadhah101 Thanks for the What I found out is that it looked like that AKS is not using iptables-ng, as opposed to what you would be expecting from the other issues. So I cannot explain this, so far. I going to look into this over the course of the next week. I'll keep you posted when I have some results. |
@tiesmaster Thanks for your response, I lack the skills to debug this unfortunately. Thanks for keeping everyone posted 🙏 |
@wadhah101 Quick update here, as I didn't manage to look into this the last couple of weeks, and I will be on holiday from now on, for over 2 weeks. Next, I don't know if I'll be able to work on this even after that for the short term, so I cannot give any guarantees. I'll keep you posted when I do. |
@tiesmaster @wadhah101 wadhah101 Major update posted by @KevinLiang10 here: It may or may not help with your issue, but is worth testing |
I'm having a similar issue on a k3s cluster #8733 wondering if this could be related. |
…le TS_DEBUG_USE_NETLINK_NFTABLES in tailscaled that was introduced in tailscale#8555 Fixes tailscale#8111, tailscale#8733
…le TS_DEBUG_USE_NETLINK_NFTABLES in tailscaled that was introduced in tailscale#8555 Fixes tailscale#8111, tailscale#8733
…le TS_DEBUG_USE_NETLINK_NFTABLES in tailscaled that was introduced in tailscale#8555 Fixes tailscale#8111, tailscale#8733
Add flag to k8s-operator to enable TS_DEBUG_USE_NETLINK_NFTABLES in tailscaled that was introduced in tailscale#8555 Fixes tailscale#8111, tailscale#8733
Add flag to k8s-operator to enable TS_DEBUG_USE_NETLINK_NFTABLES in tailscaled that was introduced in tailscale#8555 Fixes tailscale#8111, tailscale#8733 Signed-off-by: James Clarke <james@clarkezone.net>
Based on my testing, this issue appears to be resolve by the experimental NFTABLES support that was recently merged. I developed a PR to enable this in the k8s-operator and was able to get the operator working in an AKS cluster correctly as well as in my k3s case above. If you want to try my fix, you can patch the operator.yaml file as follows to pick up my privates and enable NFT mode. Pertinent changes are operator image, PROXY_IMAGE and new OPERATOR_USENFT env var: containers:
- name: operator
image: clarkezone/tsoperatornftfix:latest
resources:
…
- name: CLIENT_SECRET_FILE
value: /oauth/client_secret
- name: PROXY_IMAGE
value: "clarkezone/tsclientnftfix:latest"
- name: PROXY_TAGS
…
- name: OPERATOR_USENFT
value: "true"
|
@clarkezone That's great that you confirmed the fix. In your patch to the operator, is it possible to somehow detect that nftables exists on the Bravo for your work and @KevinLiang10 's original patch! |
@rodrigc Hi I'm working on detecting wether nftables/iptables available or used on machine, and just use it. Tho the implementation is not targeting to solve k8s problems, rather an implementation to relief user from having to explicit set env var to use the new
Thanks for this advice we will discuss about adding it to our run time logging. It's because we are detecting nftables/iptables support at runtime. I'll link these k8s issues when I put the pr up and test if the solution would help on this issue! |
@KevinLiang10 Nice work. Long term the heuristics you are implementing as part of #8762 to auto-select In #8762, if you can add good logging, so that as you develop the feature, end-users can get some |
@rodrigc I've added logs for which firewall tool is being used, and the tool's condition. Apart from that what logs do you think are particularly interesting for you? Really would love to hear what you are interested, your opinions will definitely help us to improve user experience! |
@KevinLiang10 These are some ideas I have of things to log:
Basically, anything that can help the user debug |
@KevinLiang10 the other perspective I would suggest to you, is I gave you a list of what I think are good pieces of information to log, |
HI, I still have the issue with Tailscale proxy event after setting the following flags:
Here are the logs that confirm the new options are taken into account:
The service is unreachable from my laptop:
Logs on proxy side:
|
What is the issue?
I want to expose my AKS kubernetes cluster via Tailscale, and tried to do that via the Tailscale proxy, however, that doesn't seems to proxy the traffic to the destination IP. As suggested here, I tried out the Tailscale Operator, hoping that that might work, however, I'm running into the same issue here.
To troubleshoot the issue, I've ramped up a secondary cluster, using microk8s, and I've got the Tailscale Operator working there, as you can see in the logs of the proxy pod:
Proxy pod on AKS
Proxy pod on microk8s
This is what I get when I
curl
the Tailscale IP of the sample workload (which is this Deployment, and Service that I've used for that). When I hit the AKS cluster, nothing happens, when I hit the microk8s cluster, I get the expected output.I've looked at the source of the Tailscale proxy image (which turns out to also be used under the hood of the Tailscale Operator), I see that it basically only sets up some iptables rules. So this is something you should also see in the proxy containers on both clusters. I don't have any experience with
iptables
, and I don't really know how to troubleshoot this, but I've found a couple commands to inspect things. I see that the AKS one has some rules installed, but also missing quite a few.Is this a bug in the Tailscale proxy image? Or should I report this to AKS?
iptables
output on AKSiptables
output on microk8sSteps to reproduce
loadBalancerClass
set totailscale
, like this one:kubectl apply -f https://gist.githubusercontent.com/tiesmaster/d7b397f19015514451fd0cd58b37fb06/raw/ed83bca958ee43ab107f2468a849918d4d0da87f/sample-workload-one.yaml
curl
Are there any recent changes that introduced the issue?
No response
OS
Other
OS version
AKS with Kubernetes version 1.26.3
Tailscale version
No response
Other software
No response
Bug report
No response
The text was updated successfully, but these errors were encountered: