How to update AKS Coredns?

c2_confluent 0 Reputation points
2024-09-11T00:45:31.15+00:00

Hello, I have a quick question how to properly upgrade an AKS CoreDNS deployment.

Current CoreDNS image mcr.microsoft.com/oss/kubernetes/coredns:v1.9.4-hotfix.20240704

I modify the deployment but it keeps getting written when restarting the deployment.

Thank you in advanced!

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,079 questions
{count} votes

1 answer

Sort by: Most helpful
  1. c2_confluent 0 Reputation points
    2024-09-16T20:30:58.9133333+00:00

    Hello.

    I have attempted to update using the patch command:

    kubectl patch deployment coredns -n kube-system -p '{"spec":{"template":{"spec":{"containers":[{"name":"coredns","readinessProbe":{"httpGet":{"path":"/health","port":8080}}}]}}}}'
    
    kubectl patch deployment coredns -n kube-system -p '{"spec":{"template":{"spec":{"containers":[{"name":"coredns", "image":"coredns/coredns:1.11.1"}]}}}}'
    

    (this setting changes in AKS because the default is using path=/ready and port=8181)

    Pod logs before it is terminated:

    ➜  ~ kubectl logs coredns-7fdf8445c4-cdq45 -n kube-system -f
    [WARNING] No files matching import glob pattern: custom/*.server
    [INFO] plugin/ready: Still waiting on: "kubernetes"
    .:53
    [WARNING] No files matching import glob pattern: custom/*.server
    [INFO] plugin/reload: Running configuration SHA512 = 749525aefa8e363e150f0169e7afeef478d70907bd7600b40f6ff4c467926215d931bdf9d2d0dc4735a67d9bea84b8e1e29db3b186284592a82110ba726b22d0
    CoreDNS-1.11.1
    linux/amd64, go1.20.7, ae2bbc2
    [WARNING] No files matching import glob pattern: custom/*.server
    [WARNING] No files matching import glob pattern: custom/*.server
    [WARNING] No files matching import glob pattern: custom/*.server
    [INFO] SIGTERM: Shutting down servers then terminating
    [INFO] plugin/health: Going into lameduck mode for 5
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.