tailscale / tailscale/tailscale

FR: Support userspace mode in Kubernetes Operator - Connector CRD

Open
#11,552 11 comments 6 reactions 0 assignees View on GitHub
Backlog kubernetes
Dominant language
Go
Stars
36.5k
Forks
3.2k
Avg merge
2d 3h
Merged PRs (30d)
123

Description

### What are you trying to do?

I have a case where using Cilium as our Kubernetes CNI, which replaces kube-proxy entirely and does not use iptables/nftables at all. When attempting to access on-cluster resources from somewhere on the tailnet, I can see connections going into the tailscale connector pod, but I do not see the corresponding response in tailscale pod logs. This indicates to me that ip masquerading may be broken.

If I stop the tailscale operator and instead use https://tailscale.com/kb/1185/kubernetes#subnet-router to manually create a pod directly, I get the same problem. However, if I change the pod to show the following:
```
- name: TS_USERSPACE
value: "true"
```
then connections are all happy. This is acceptable in my case, since I am not looking for resources running on Kubernetes to be able to access my tailnet. The only use case desired is for connections in the opposite directions, allowing my tailnet to access resources running on k8s.

### How should we solve this?

Expose the ability in Connector objects to run the connector in userspace mode.

### What is the impact of not solving this?

The Tailscale operator, and all the value it provides, is unfortunately lost. I would love to be using the official operator for this functionality.

### Anything else?

Logs of successful connection, when pod is in userspace=true mode:
```
2024/03/28 18:22:59 Accept: TCP{100.93.111.98:56606 > 192.168.172.111:80} 64 tcp ok
2024/03/28 18:22:59 Accept: TCP{100.93.111.98:56606 > 192.168.172.111:80} 52 tcp non-syn
2024/03/28 18:22:59 Accept: TCP{100.93.111.98:56606 > 192.168.172.111:80} 131 tcp non-syn
```

Failure logs when the connection is not in userspace=true mode:
```
2024/03/27 16:02:50 Accept: TCP{100.93.111.98:51603 > 192.168.172.111:80} 64 tcp ok
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.