To improve the stability of DNS resolution in Container Service for Kubernetes (ACK) clusters, we recommend that you update CoreDNS to the latest version. This topic describes how to update CoreDNS.
- If connectivity issues occur between CoreDNS and the API server, such as network jitters, API server restarts, or API server migrations, CoreDNS pods may be restarted because error logs cannot be written. For more information, see Set klog's logtostderr flag.
- CoreDNS occupies extra memory resources during the initialization process. In this process, the default memory limit may cause out of memory (OOM) errors in large-scale clusters. If this situation intensifies, CoreDNS pods may be restarted repetitively but fail to be started. For more information, see CoreDNS uses a lot memory during initialization phase.
- CoreDNS has issues that may affect the domain name resolution of headless Services and requests from outside the cluster. For more information, see plugin/kubernetes: handle tombstones in default processor and Data is not synced when CoreDNS reconnects to kubernetes api server after protracted disconnection.
- Some earlier CoreDNS versions are configured with default toleration rules that may cause CoreDNS pods to fail to be automatically evicted when exceptions occur on the host node. This may lead to domain name resolution errors in the cluster.
- Automatic update: Navigate to the Add-ons page in the ACK console. If the Upgrade button is displayed next to the CoreDNS component, it indicates that the component can be automatically updated. For more information, see Configure ACK to automatically update CoreDNS.
- Manual update: Navigate to the Add-ons page in the ACK console. If the Upgrade button is not displayed next to the CoreDNS component, it indicates that the current component version is outdated. This also indicates that the Kubernetes version of your cluster is outdated and discontinued. In this case, you cannot update CoreDNS to the latest version. To resolve this issue, you must update CoreDNS to 1.6.2 and then update the Kubernetes version of your cluster. Then, you can automatically update CoreDNS to the latest version. For more information about how to manually update CoreDNS, see Manually update CoreDNS.