This topic answers frequently asked questions about DNS in Alibaba Cloud Container Service for Kubernetes (ACK) clusters.
Why is CoreDNS using a deprecated API?
Symptoms
During a cluster pre-upgrade check, you may find that a client with the user agent coredns is accessing the deprecated discovery.k8s.io/v1beta1 Kubernetes API at the /apis/discovery.k8s.io/v1beta1 endpoint.
Cause
CoreDNS uses the discovery.k8s.io/v1beta1 API to connect to the APIServer, but this API is deprecated in your cluster's Kubernetes version. This issue has two possible causes:
-
The CoreDNS version is outdated. The version installed on your cluster does not support the
discovery.k8s.io/v1API and can only use thediscovery.k8s.io/v1beta1API. -
CoreDNS was likely initialized when your cluster ran an older Kubernetes version, such as 1.20. During startup, it selected the
discovery.k8s.io/v1beta1API. Even after you upgraded the cluster and CoreDNS, the running instance continues to use this now-deprecated API.
Solution
-
Log on to the ACS console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of the target cluster. In the left navigation pane, click Add-ons.
-
On the Add-ons page, click the networking tab and upgrade the CoreDNS component.