kubernetes-retired / cluster-api-provider-nested

Cluster API Provider for Nested Clusters
Apache License 2.0
301 stars 67 forks source link

✨ Enhancement for virtual cluster DNS #329

Closed LuBingtan closed 1 year ago

LuBingtan commented 1 year ago

User Story

As a user I would like to use different versions of dns server in different tenants.

For example, CoreDNS v1.10.0 in virtual cluster A, and CoreDNS v1.9.2 in virtual cluster B.

Detailed Description The current DNS solution is using CoreDNS with a specific patch (tenant-dns doc). So that we need to rebuild multiple versions of the CoreDNS image, which will take a lot of work.

I would like to introduce a new solution that does not require changes to the code of CoreDNS. We can leverage the k8s_external plugin in CoreDNS, and then add the cluster ip of pService to the ExternalIPs of vService. So that we can successfully resolve the service name in pod.

Anything else you would like to add:

/kind feature

LuBingtan commented 1 year ago

I have tried this solution in my local development environment, and it seems work.

Also opened a PR for this (https://github.com/kubernetes-sigs/cluster-api-provider-nested/pull/330), plz take a look /cc @wondywang @Fei-Guo @christopherhein