Skip to content

Conversation

@light0011
Copy link

Description

This PR adds a practical example to the HPA documentation demonstrating how to use the AverageValue target type for resource-based scaling.

Changes:

  • Added YAML configuration examples showing AverageValue usage for CPU and memory
  • Clarified that AverageValue scales based on actual resource consumption rather than resource requests
  • Improved documentation clarity by providing a concrete alternative to Utilization-based scaling

This enhancement helps users understand when and how to use absolute resource values for autoscaling, particularly useful when resource requests are not defined or when absolute thresholds are preferred.

Issue

Closes: #53447

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 27, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Nov 27, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dipesh-rawat for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @light0011!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 27, 2025
   - Added example showing how to use AverageValue target type
   - Clarified that AverageValue scales based on actual consumption
   - Addresses issue kubernetes#53447
@light0011 light0011 force-pushed the fix-hpa-averagevalue-docs branch from 78ef91c to a78bff6 Compare November 27, 2025 07:56
@netlify
Copy link

netlify bot commented Nov 27, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 78ef91c
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/692802a755cd13000897b0d1
😎 Deploy Preview https://deploy-preview-53467--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 27, 2025
@netlify
Copy link

netlify bot commented Nov 27, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 6cc6730
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/692d5c6bd4fd1a0008b7acee
😎 Deploy Preview https://deploy-preview-53467--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@light0011 light0011 marked this pull request as draft November 27, 2025 08:17
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 27, 2025
@light0011 light0011 marked this pull request as ready for review November 27, 2025 08:18
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 27, 2025
Copy link
Member

@omerap12 omerap12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t this be moved to the HPA walkthrough rather than the concept section?

Per review feedback from @omerap12, moved the example to the
walkthrough document in the 'Autoscaling on multiple metrics'
section where AverageValue is first explained.

- Added practical example showing CPU scaling with AverageValue
- Clarified use cases for absolute value scaling
- Provided context on when to use this approach vs Utilization

Closes: kubernetes#53447
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Dec 1, 2025
Per review feedback from @omerap12, moved the example to the
walkthrough document in the 'Autoscaling on multiple metrics'
section where AverageValue is first explained.

- Added practical example showing CPU scaling with AverageValue
- Clarified use cases for absolute value scaling
- Provided context on when to use this approach vs Utilization

Closes: kubernetes#53447
@k8s-ci-robot
Copy link
Contributor

Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages.

The list of commits with invalid commit messages:

  • a024d2b Move AverageValue example to walkthrough doc
  • 6cc6730 Move AverageValue example to walkthrough doc

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@light0011
Copy link
Author

Shouldn’t this be moved to the HPA walkthrough rather than the concept section?

@omerap12 Thanks for the feedback! I've moved the example to the walkthrough document.

Changes made:

  • Removed the example from the concept doc (horizontal-pod-autoscale.md)
  • Added it to the walkthrough (horizontal-pod-autoscale-walkthrough.md) in the "Autoscaling on multiple metrics" section
  • Placed it right after the existing AverageValue explanation for memory, where it flows naturally
  • Added context about when to use this approach

The example now fits better in the practical tutorial context. Please take another look when you have a chance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. language/en Issues or PRs related to English language size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvement for k8s.io/docs/tasks/run-application/horizontal-pod-autoscale/

3 participants