kubernetes-sigs / metrics-server

Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
https://kubernetes.io/docs/tasks/debug-application-cluster/resource-metrics-pipeline/
Apache License 2.0
5.77k stars 1.86k forks source link

AKS 1.24 - * spec.template.spec.containers[0].resources.requests: Invalid value: "100m": must be less than or equal to cpu limit * spec.template.spec.containers[0].resources.requests: Invalid value: "200Mi": must be less than or equal to memory limit #1205

Open regaltopax opened 1 year ago

regaltopax commented 1 year ago

Hi,

I am running into this issue when running an AKS cluster with 1.24 and 1.25 versions.

Command used kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/metrics-server-helm-chart-3.8.3/components.yaml

This error is consistent no matter the version of metrics server used on the cluster. AKS 1.23 cluster doesnt have the issue. I also do not see this issue on EKS 1.24 either

Error The Deployment "metrics-server" is invalid:

I have 2 nodepools with the same vm size Standard_D8_v3, which has 8vcpu's and 32GiB Memory

kubectl get nodes output NAME CPU(cores) CPU% MEMORY(bytes) MEMORY% aks-pool1-xxx-vmss000000 110m 1% 4032Mi 14% aks-default-xxx-vmss000000 175m 2% 3599Mi 12%

AKS 1.24

My current workaround was to download the chart, remove the resource section, and run which works, but its not ideal since it does not have the necessary resource requirement

Happy to provide further information /kind support

dgrisonnet commented 1 year ago

/triage accepted /assign @yangjunmyfm192085

yangjunmyfm192085 commented 1 year ago

Hi, @regaltopax, Please check whether the kubernetes cluster is configured with LimitRange?

regaltopax commented 1 year ago

Hi @yangjunmyfm192085 . I checked limits on the cluster, there is no limitrange applied on it

kubectl get limits -A No resources found

dankiki commented 1 year ago

explicitly specifying resource limits along with the resource requests does make it work on AKS 1.25

anachronic commented 4 months ago

Same thing happened to me in AKS. Turns out metrics server was already installed and I think the new deployment was somehow clashing with the existent one.