Open saadbahir opened 3 months ago
Hi @saadbahir
Thank you for creating the issue and for the use case description.
We actually hadn't thought about cross-cluster access to the kube-apiserver via the cluster MagicDNS, but I think that's a really good use case!
I just tested it and it worked for me.
As a note, since #10499 has not merged yet and also we haven't yet published official nameserver images, this functionality is a bit difficult to test.
The way I tested it was:
DNSConfig
and modify kube-dns in cluster 1 as per the PR description in https://github.com/tailscale/tailscale/pull/11019 (at the moment there isn't a very straightforward way to test this, you would have to use gcr.io/csi-test-290908/k8s-nameserver:v0.0.4crossclusterapi
as the nameserver image or build your own- we haven't pushed images yetOapiVersion: v1
kind: Service
metadata:
annotations:
tailscale.com/tailnet-fqdn: <full-operator-magic-dns-name-from-cluster-2>
name: operator-egress
namespace: default
spec:
externalName: placeholder
type: ExternalName
Pod
and adding there kubeconfig generated by tailscale configure kubeconfig
. This worked and I was able to run kubectl
commands for against the Kubernetes APi server in cluster 1 from a workload Pod in cluster 2.We will document these steps better once all of the work for the MagicDNS name resolution in cluster gets merged and we have published the nameserver images.
Keen to hear if the this will work for you and also especially if the last steps (configuring RBAC for proxy tags in cluster 2 and passing kubeconfig to cluster workloads) will make sense for your workflow.
I am not very familiar with cross-cluster ArgoCD- is there a way to pass cluster 2 kubeconfig to it, or does it need to be configured in some other way?
I believe the easy workaround I found for specifically argocd was just setting this:
tls_client_config:
server_name: <magicdns name>
Then you can simply use the cluster URL for access.
What is the issue?
Hello everyone,
Context
I have the following use case:
Goal:
Problem:
What I have done so far:
I also tried editing
coredns
configmap following this recommendation to add the magicDNS nameserverMaybe I misunderstand the premise of the kubernetes operator and my use case is not covered
Has anyone tried to fix this use case? If so, what can I try to resolve it?
Thank you for your help!
Steps to reproduce
No response
Are there any recent changes that introduced the issue?
No response
OS
Linux
OS version
No response
Tailscale version
No response
Other software
No response
Bug report
No response