Check whether the current CoreDNS key configuration Corefile is different from the Helm release record. The difference may be overwritten during the add-on upgrade, affecting domain name resolution in the cluster.
You can upgrade CoreDNS separately after confirming the configuration differences.
kubectl get cm -nkube-system coredns -o jsonpath='{.data.Corefile}' > corefile_now.txt cat corefile_now.txt
latest_release=`kubectl get secret -nkube-system -l owner=helm -l name=cceaddon-coredns --sort-by=.metadata.creationTimestamp | awk 'END{print $1}'` kubectl get secret -nkube-system $latest_release -o jsonpath='{.data.release}' | base64 -d | base64 -d | gzip -d | python -m json.tool | python -c " from __future__ import print_function import json,sys,re,yaml; manifests = json.load(sys.stdin)['manifest'] files = re.split('(?:^|\s*\n)---\s*',manifests) for file in files: if 'coredns/templates/configmap.yaml' in file and 'Corefile' in file: corefile = yaml.safe_load(file)['data']['Corefile'] print(corefile,end='') exit(0); print('error') exit(1); " > corefile_record.txt cat corefile_record.txt
diff corefile_now.txt corefile_record.txt -y;
kubectl get cm -nkube-system coredns -o jsonpath='{.data.Corefile}'
In addition, it is a good practice to use the parameter configuration function of CCE add-ons to modify the Corefile configuration for consistency.