DNS FAQ

更新时间:
复制 MD 格式

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/v1 API and can only use the discovery.k8s.io/v1beta1 API.

  • CoreDNS was likely initialized when your cluster ran an older Kubernetes version, such as 1.20. During startup, it selected the discovery.k8s.io/v1beta1 API. Even after you upgraded the cluster and CoreDNS, the running instance continues to use this now-deprecated API.

Solution

  1. Log on to the ACS console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of the target cluster. In the left navigation pane, click Add-ons.

  3. On the Add-ons page, click the networking tab and upgrade the CoreDNS component.