Metric-server v0.3.6 is crashing with CrashLoopBackOff error on AKS 1.19.13.

Mikko Uusitalo 25 Reputation points
2024-03-27T11:27:33.86+00:00

Metric-server on my AKS service is crashing and we are unable to use autoscaling at the moment because of this. The crashing is due to this problem:

Error: error creating self-signed certificates: mkdir apiserver.local.config: read-only file system

This has been fixed in future versions by adding - --cert-dir=/tmp to container deployment args but aks prevents me from updating the configuration or updating the metric-server all together.

Is there any workaround on this all is the cluster update our only option?

We cannot update cluster now because it might disrupt some services running on it so for now fixing the metric-server crashing problem would be sufficient for now.

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,449 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Goncalo Correia 351 Reputation points Microsoft Employee
    2024-03-27T15:08:59.9866667+00:00

    Hi @Mikko Uusitalo

    Welcome to Microsoft Q&A, Thank you for posting your query here.Your assumption is correct, the issue is fixed in the later versions, so update is the best way to go here.

    Besides that, you can try to mitigate the issue at that version by deploying a second deployment for metrics server (with the fix manually applied in the yaml) in the kube-system namespace with the tag that matches the metrics-server service selector (k8s-app: metrics-server).

    Doing this will allow you to have endpoints for that service and have the apiservice available.

    0 comments No comments

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.