CoreDNS Component Manual Dilatation Guide
Updated at:2025-10-27
Compatibility of CoreDNS and K8S version
| CoreDNS image version | Supported K8S versions |
|---|---|
| 1.7.1 | 1.18 |
| 1.9.4-baidu | 1.20,1.24,1.26,1.28 |
⚠️ Note: Upgrading CoreDNS will lead to a 5-minute network interruption across the entire cluster. Please proceed with the upgrade only after a comprehensive evaluation.
Upgrade process
- To check the current CoreDNS image version in the cluster, use the following command:
kubectl -n kube-system get deployment coredns -o yaml | grep "image:"
Example output:
image: registry.baidubce.com/cce-plugin-pro/coredns:1.7.1 - Modify potential plugin name changes.
If the CoreDNS image version is very old (below 1.6.2, where the forward plugin was previously named proxy), use the following command:
kubectl -n kube-system get cm coredns -o yaml
If the plugin name shown in the diagram is not forward but proxy:

modify it to forward
using the following commandkubectl -n kube-system get cm coredns -o yaml - add endpointslices permissions
Use the following command:
kubectl -n kube-system get clusterrole system:coredns -o yaml
If the result shows missing endpointslices permissions, proceed via:
kubectl -n kube-system edit clusterrole system:coredns
Add permissions. The modified clusterrole content is as follows:
Plain Text
1apiVersion: rbac.authorization.k8s.io/v1
2kind: ClusterRole
3metadata:
4 labels:
5 kubernetes.io/bootstrapping: rbac-defaults
6 name: system:coredns
7rules:
8 - apiGroups:
9 - ""
10 resources:
11 - endpoints
12 - services
13 - pods
14 - namespaces
15 verbs:
16 - list
17 - watch
18 - apiGroups:
19 - discovery.k8s.io
20 resources:
21 - endpointslices
22 verbs:
23 - list
24 - watch
- Modify image version
Upgrade the CoreDNS image version to the desired one (e.g., 1.9.4-baidu) with the following command:
kubectl -n kube-system edit deployment corednsThe modified example is as follows:

- Check upgrade result
Use the command:
kubectl -n kube-system get pod -o wide | grep coredns
Check whether all pods have successfully started Use the command:
kubectl -n kube-system logs <coredns-pod-name> | less -N
Check whether the CoreDNS pod has error logs
If abnormalities exist in the above process, submit a ticket for handling; if all are normal, the upgrade is completed.
