Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the v2beta2 syntax for CPU and Memory autoscaling #50

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

gary-archer
Copy link
Contributor

@gary-archer gary-archer commented Oct 21, 2022

I made a small change so that the syntax output for the HPA is now correct for v2beta2 for CPU and memory:

metrics:
- type: Resource
  resource:
    name: cpu
    target:
      type: Utilization
      averageUtilization: 80

Customers then need to install the metrics-server, which could be done like this in a basic development install:

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml --kubelet-insecure-tls

By default I then get this issue, and from googling it seems that resource limits should also be activated for this feature to work. Eg also set this in the Helm chart:

resources:
  limits:
    cpu: 500m
  requests:
    cpu: 500m

For now I will add some brief notes to the autoscaling tutorial to indicate that you may also need to set CPU / memory resource limits. This behaviour could change in future I think.

@gary-archer gary-archer changed the title WIP: Use the v2beta2 syntax for CPU and Memory autoscaling Use the v2beta2 syntax for CPU and Memory autoscaling Oct 24, 2022
@gary-archer gary-archer requested a review from anestos October 24, 2022 09:23
@anestos anestos merged commit f9ceb6c into master Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants