Skip to content

Commit 2741a1d

Browse files
committed
Add egress services configuration for ArgoCD cluster in Tailscale setup
1 parent 4f63e57 commit 2741a1d

File tree

1 file changed

+39
-39
lines changed

1 file changed

+39
-39
lines changed

content/post/argocd-tailscale/index.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,42 @@ Key parameters:
3535

3636
Configure each cluster with a unique hostname (e.g., `cluster1-k8s-operator`, `cluster2-k8s-operator`).
3737

38+
## Create Egress Services in ArgoCD Cluster
39+
40+
Apply the following configuration to create egress services in the ArgoCD cluster:
41+
42+
```yaml
43+
apiVersion: v1
44+
kind: Service
45+
metadata:
46+
name: cluster1-k8s-operator
47+
annotations:
48+
tailscale.com/tailnet-fqdn: cluster1-k8s-operator.<TAILNET>.ts.net
49+
spec:
50+
externalName: placeholder
51+
type: ExternalName
52+
ports:
53+
- name: https
54+
port: 443
55+
protocol: TCP
56+
---
57+
apiVersion: v1
58+
kind: Service
59+
metadata:
60+
name: cluster2-k8s-operator
61+
annotations:
62+
tailscale.com/tailnet-fqdn: cluster2-k8s-operator.<TAILNET>.ts.net
63+
spec:
64+
externalName: placeholder
65+
type: ExternalName
66+
ports:
67+
- name: https
68+
port: 443
69+
protocol: TCP
70+
```
71+
72+
Replace `<TAILNET>` with your Tailscale tailnet name.
73+
3874
## Configure Tailscale ACL Grants for Cross-Cluster Access
3975

4076
For egress proxies to communicate with Kubernetes API servers exposed by the Tailscale operators, you need to configure appropriate ACL grants in your Tailscale admin console.
@@ -43,8 +79,8 @@ For egress proxies to communicate with Kubernetes API servers exposed by the Tai
4379

4480
Without proper ACL grants:
4581
1. Access to remote Kubernetes API servers will be blocked by Tailscale\'s access controls
46-
2. ArgoCD will be unable to manage resources across clusters
47-
3. Cross-cluster communication will fail with authentication errors
82+
2. Tailscale Egress proxies will be unable to manage resources across clusters
83+
3. Cross-cluster API server communication will fail with authentication errors
4884

4985
### Configuring ACL Grants
5086

@@ -78,7 +114,7 @@ Key components of this configuration:
78114
- `"recorder": ["tag:k8s-recorder"]` - Optional audit logging configuration
79115
- `"enforceRecorder": false` - Makes audit recording optional
80116

81-
This grant enables ArgoCD (tagged with `tag:k8s`) to communicate with the Kubernetes API servers exposed by the Tailscale operators in your remote clusters.
117+
This grant enables Tailscale egress proxies (tagged with `tag:k8s`) to communicate with the Kubernetes API servers exposed by the Tailscale operators in your remote clusters.
82118

83119
## Set Up DNS Configuration in ArgoCD Cluster
84120

@@ -137,42 +173,6 @@ data:
137173

138174
This configuration tells CoreDNS to forward all `ts.net` domain resolution requests to the Tailscale nameserver, allowing pods in your cluster to resolve Tailnet hostnames.
139175

140-
## Create Egress Services in ArgoCD Cluster
141-
142-
Apply the following configuration to create egress services in the ArgoCD cluster:
143-
144-
```yaml
145-
apiVersion: v1
146-
kind: Service
147-
metadata:
148-
name: cluster1-k8s-operator
149-
annotations:
150-
tailscale.com/tailnet-fqdn: cluster1-k8s-operator.<TAILNET>.ts.net
151-
spec:
152-
externalName: placeholder
153-
type: ExternalName
154-
ports:
155-
- name: https
156-
port: 443
157-
protocol: TCP
158-
---
159-
apiVersion: v1
160-
kind: Service
161-
metadata:
162-
name: cluster2-k8s-operator
163-
annotations:
164-
tailscale.com/tailnet-fqdn: cluster2-k8s-operator.<TAILNET>.ts.net
165-
spec:
166-
externalName: placeholder
167-
type: ExternalName
168-
ports:
169-
- name: https
170-
port: 443
171-
protocol: TCP
172-
```
173-
174-
Replace `<TAILNET>` with your Tailscale tailnet name.
175-
176176
## Access Remote Clusters
177177

178178
Generate the kubeconfig for each cluster:

0 commit comments

Comments
 (0)