-
Notifications
You must be signed in to change notification settings - Fork 15k
Add the blog post for the beta graduation of HPA ContainerResource type metric #39822
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
Conversation
/area blog |
/sig autoscaling |
2d0f3d4
to
68859ab
Compare
/sig autoscaling |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of more general points:
- I think we should call out the changes made by kubernetes/kubernetes#116045 given the potential for users to be looking at these events.
- Could we introduce more detail on the metrics, including the labels on the metrics?
## What's new for the beta? | ||
|
||
For Kubernetes v1.27, the ContainerResource type metric will be available by default as described at the beginning. | ||
(You can still disable it by the `HPAContainerMetrics` feature gate.) | ||
|
||
On the instrumentation side, the kube-controller-manager reports the following new metrics([ref1](https://github.com/kubernetes/kubernetes/pull/116326), [ref2](https://github.com/kubernetes/kubernetes/pull/116010)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make clearer that this is a benefit even for those who won't make use of the promotion of the ContainerResources to beta.
In case a Pod has multiple containers, the utilization calculation would be: | ||
|
||
``` | ||
sum{the resource usages of each container} / sum{the resource request of each container} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sum{the resource usages of each container} / sum{the resource request of each container} | |
sum{the resource usage of each container} / sum{the resource request of each container} |
In case a Pod has multiple containers, the utilization calculation would be: | ||
|
||
``` | ||
sum{the resource usages of each container} / sum{the resource request of each container} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sum{the resource usages of each container} / sum{the resource request of each container} | |
sum{the resource usage of each container} / sum{the resource request of each container} |
|
||
So, even if one container's resource utilization goes high, the Resource type metric may not suggest scaling up. | ||
|
||
If your Pod has multiple containers, you may want to use the ContainerResource type metric instead for the accurate autoscaling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth explicitly calling out an example where this might be useful (e.g. a logging or metrics sidecar)?
The ContainerResource type metric allows us to configure the autoscaling based on resource usage of individual containers. | ||
|
||
In the following example, the HPA controller scales the target | ||
so that the average utilization of the cpu in the application container of all the pods is 60%. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This risks being slightly misleading, I would recommend linking out to the more detailed discussion of the algorithm in our docs given the edge cases including tolerance etc.
Hello, Comms Lead for the 1.27 release here. This feature blog is tracked for release, the deadline for submitting the draft is on 4th of April- the sooner the better since there's still editing to be done afterwards. Any doubt, the Comms team is here to help. |
@gjtempleton Thanks for reviews, please retake a look when have time 🙏 |
Hello, Comms Lead for v1.27 here. The publication order and date for the Feature Blog series has been finalized and the tracking board is updated. The publication date for this article is 02-05-2023 (May 02). Thank you! |
--- | ||
layout: blog | ||
title: "HPA ContainerResource type metric moves to beta" | ||
date: 2023-04-11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
date: 2023-04-11 | |
date: 2023-05-02 |
Please also change the file path to match the new date.
@sanposhiho, friendly reminder for the above fixes. |
Ah, sorry for unnotice. I'll give a quick fix. |
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
A couple of things could be improved with spelling and word choice. Still, given its publication date is today, and we are already pushing other blog posts out, I'd like to approve this -- especially since it has a technical LGTM. Reapplying @gjtempleton's tech lgtm: Approving from a tech docs lens: I'll open a PR to update the spelling and grammar shortly after approval. |
LGTM label has been added. Git tree hash: 087d203d485e7be473d334853006185776b88552
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nate-double-u The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few, important fixes.
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Nate W. <[email protected]>
content/en/blog/_posts/2023-05-02-hpa-container-resource-metric.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's late, but perhaps still better to ship than not.
/lgtm
/hold cancel
LGTM label has been added. Git tree hash: 3ea576cdefd8149537e727299e1c10fab1775c63
|
/label tide/merge-method-squash |
Thanks everyone for handling this 🙏 |
…pe metric (kubernetes#39822) * Add the blog post for the beta graduation of HPA ContainerResource type metric * fix based on reviews * fix based on the suggestion * fix based on review * update date * Apply changes from code review Co-authored-by: Nate W. <[email protected]> * Push back publication date and timezone --------- Co-authored-by: Tim Bannister <[email protected]> Co-authored-by: Nate W. <[email protected]>
The container resource metrics is planning to get graduated to beta in v1.27. So, the feature will be available for many people by default.
It’s worth sharing this feature and the motivation for people since this feature is very important to configure safe HPAs for Pod with multiple containers.
ref: kubernetes/enhancements#1610