No More Self-Building Required! CoreDNS v1.12.2 Now Includes Standard Multicluster Support

TL;DR

Multicluster support has been integrated into CoreDNS v1.12.2!

https://github.com/coredns/coredns/pull/7266

You can now resolve clusterset.local by just configuring the Corefile and RBAC

Background

Previously, it was necess…


This content originally appeared on DEV Community and was authored by Kahiro Okina

TL;DR

Background

Previously, it was necessary to self-build CoreDNS by adding the coredns/multicluster plugin, but starting with CoreDNS v1.12.2, it has been integrated into the Kubernetes plugin, allowing you to handle clusterset.local with just the official image.

Examples of Corefile configuration can be found in the official README.

Setup Method

  • Image: Use registry.k8s.io/coredns/coredns:v1.12.2 or later versions
  • Edit the Corefile

Corefile Configuration

Add clusterset.local to the kubernetes plugin and enable multicluster.

kubernetes cluster.local clusterset.local {
    multicluster clusterset.local
}

Command to directly patch the existing kube-system/coredns ConfigMap:

kubectl --kubeconfig "${KUBECONFIG}" get configmap -n kube-system coredns -o yaml | \
  sed -E 's/^([[:space:]]*)kubernetes cluster\.local (.*)$/\1kubernetes cluster.local clusterset.local \2\n\1   multicluster clusterset.local/' | \
  kubectl --kubeconfig "${KUBECONFIG}" replace -f-

Verification after application is recommended

Granting Permissions

Extend the ClusterRole so that CoreDNS can list/watch ServiceImport.

rules:
- apiGroups: ["multicluster.x-k8s.io"]
  resources: ["serviceimports"]
  verbs: ["list", "watch"]

Command to add permissions:

kubectl patch clusterrole system:coredns --type=json --patch '[
  {
    "op": "add",
    "path": "/rules/-",
    "value": {
      "apiGroups": ["multicluster.x-k8s.io"],
      "resources": ["serviceimports"],
      "verbs": ["list","watch"]
    }
  }
]'

Rollout

Update the CoreDNS image to v1.12.2.

kubectl -n kube-system set image deploy/coredns coredns=registry.k8s.io/coredns/coredns:v1.12.2
kubectl -n kube-system rollout status deploy/coredns

Verification Tips

  1. Check if ServiceImport is visible
kubectl get serviceimports.multicluster.x-k8s.io -A
  1. Check if clusterset.local can be resolved

From a debug pod or similar:

kubectl exec -it -n default deploy/your-app -- sh -c 'dig +short my-svc.my-namespace.svc.clusterset.local'

References & Extras


This content originally appeared on DEV Community and was authored by Kahiro Okina


Print Share Comment Cite Upload Translate Updates
APA

Kahiro Okina | Sciencx (2025-09-08T05:27:53+00:00) No More Self-Building Required! CoreDNS v1.12.2 Now Includes Standard Multicluster Support. Retrieved from https://www.scien.cx/2025/09/08/no-more-self-building-required-coredns-v1-12-2-now-includes-standard-multicluster-support/

MLA
" » No More Self-Building Required! CoreDNS v1.12.2 Now Includes Standard Multicluster Support." Kahiro Okina | Sciencx - Monday September 8, 2025, https://www.scien.cx/2025/09/08/no-more-self-building-required-coredns-v1-12-2-now-includes-standard-multicluster-support/
HARVARD
Kahiro Okina | Sciencx Monday September 8, 2025 » No More Self-Building Required! CoreDNS v1.12.2 Now Includes Standard Multicluster Support., viewed ,<https://www.scien.cx/2025/09/08/no-more-self-building-required-coredns-v1-12-2-now-includes-standard-multicluster-support/>
VANCOUVER
Kahiro Okina | Sciencx - » No More Self-Building Required! CoreDNS v1.12.2 Now Includes Standard Multicluster Support. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/09/08/no-more-self-building-required-coredns-v1-12-2-now-includes-standard-multicluster-support/
CHICAGO
" » No More Self-Building Required! CoreDNS v1.12.2 Now Includes Standard Multicluster Support." Kahiro Okina | Sciencx - Accessed . https://www.scien.cx/2025/09/08/no-more-self-building-required-coredns-v1-12-2-now-includes-standard-multicluster-support/
IEEE
" » No More Self-Building Required! CoreDNS v1.12.2 Now Includes Standard Multicluster Support." Kahiro Okina | Sciencx [Online]. Available: https://www.scien.cx/2025/09/08/no-more-self-building-required-coredns-v1-12-2-now-includes-standard-multicluster-support/. [Accessed: ]
rf:citation
» No More Self-Building Required! CoreDNS v1.12.2 Now Includes Standard Multicluster Support | Kahiro Okina | Sciencx | https://www.scien.cx/2025/09/08/no-more-self-building-required-coredns-v1-12-2-now-includes-standard-multicluster-support/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.