This topic provides answers to some frequently asked questions about Domain Name System (FAQ) in Alibaba Cloud Container Compute Service (ACS) clusters.
Why does CoreDNS use deprecated APIs?
Issue
The cluster update precheck result shows that the client whose user agent is coredns uses the deprecated Kubernetes API discovery.k8s.io/v1beta1. The endpoint of the API is /apis/discovery.k8s.io/v1beta1.
Cause
CoreDNS uses the discovery.k8s.io/v1beta1 API to connect to the API server. However, the API is deprecated or will be deprecated in the cluster version that you use. This issue occurs in the following scenarios:
An earlier CoreDNS version is installed in the cluster. CoreDNS uses the
discovery.k8s.io/v1beta1API because the current version does not support thediscovery.k8s.io/v1API.The versions of CoreDNS and Kubernetes are up-to-date. However, CoreDNS is launched in an earlier Kubernetes version, such as 1.20, and the
discovery.k8s.io/v1beta1API is selected when ACK launches the CoreDNS pod. Then, the cluster is updated to a Kubernetes version in which thediscovery.k8s.io/v1beta1API is deprecated but CoreDNS still uses the deprecated API.
Solutions
Log on to the ACS console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its ID. In the left-side navigation pane of the cluster details page, choose Operations > Add-ons.
On the Networking tab of the Add-ons page, update the CoreDNS component.