-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
blog: introducing kube-scheduler-simulator #47104
base: main
Are you sure you want to change the base?
Conversation
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
title: "Introducing Kube-scheduler-simulator" | ||
date: 2024-07-xx | ||
slug: introducing-kube-scheduler-simulator | ||
canonicalUrl: https://kubernetes.dev/blog/2024/07/xx/introducing-kube-scheduler-simulator/ |
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.
What's the reason for including the canonicalURL
here? Is this blog mirrored from the k8s.dev site? If so, review comments should be added to the original content there.
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.
Sorry, actually I just copied those tags from another blog post.
I saw Kwok's blog post, which I actually copied tags from, have an article in each website.
- https://www.kubernetes.dev/blog/2023/03/01/introducing-kwok/
- https://kubernetes.io/blog/2023/03/01/introducing-kwok/
Would you recommend creating a blog post in kubernetes.dev too? What's the general difference between those two blog websites?
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.
https://www.kubernetes.dev/blog/ is aimed only at people contributing to Kubernetes
https://www.kubernetes.io/blog/ is aimed at people using to Kubernetes
Who is this article aimed at? I think people might be using this even though they are not Kubernetes contributors - right?
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.
Who is this article aimed at? I think people might be using this even though they are not Kubernetes contributors - right?
Yes, correct. So, here's the place for kubernetes.io blog, right?
Did you suggest making the same post on .dev too? Or, is having it only here fine?
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 article is in the right repo. No need to change it.
We never mirror from the general website to the contributor website, so there's also no need to open a PR against the contributor site for this article.
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
updated to use |
FYI: related issue - #39776 |
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 copy-edit pass and some nits:
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
Addressed the points from @nate-double-u. |
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.
nit(optional)
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
The overall content LGTM. Thanks for the contribution @sanposhiho |
Fixed. |
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.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.
Thanks.
Would you be willing to propose this for https://k8s.dev/blog instead? See https://github.com/kubernetes/contributor-site
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
Addressed the suggestions from @sftim @network-charles. @sftim I actually had a question on that topic -
Do you mean, we should move it to kubernetes.dev (and do nothing with .io)? Or we should have it on both websites? |
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2024-07-xx-kube-scheduler-simulator/index.md
Outdated
Show resolved
Hide resolved
See #47104 (comment) |
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.
Thanks for the PR, and please accept our apologies about the long wait for a review.
I hope this feedback comes over as helpful.
The Kubernetes Scheduler is a crucial control plane component that determines which Node a Pod will run on. | ||
Thus, anyone utilizing Kubernetes relies on the scheduler. | ||
|
||
[Kube-scheduler-simulator](https://sigs.k8s.io/kube-scheduler-simulator) is a simulator for the Kubernetes scheduler, initially developed by Kensei Nakada as part of [Google Summer of Code 2021](https://summerofcode.withgoogle.com/). |
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.
Try this:
[Kube-scheduler-simulator](https://sigs.k8s.io/kube-scheduler-simulator) is a simulator for the Kubernetes scheduler, initially developed by Kensei Nakada as part of [Google Summer of Code 2021](https://summerofcode.withgoogle.com/). | |
The [kube-scheduler-simulator](https://sigs.k8s.io/kube-scheduler-simulator) is a simulator for the Kubernetes scheduler, initially developed by me (Kensei Nakada) as part of [Google Summer of Code 2021](https://summerofcode.withgoogle.com/). |
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.
As this is a blog article, you can write in the first person, and you are implicitly writing as you.
[Kube-scheduler-simulator](https://sigs.k8s.io/kube-scheduler-simulator) is a simulator for the Kubernetes scheduler, initially developed by Kensei Nakada as part of [Google Summer of Code 2021](https://summerofcode.withgoogle.com/). | ||
This tool allows users to closely examine the scheduler’s behavior and decisions. | ||
|
||
It is useful for casual users who employ scheduling constraints (e.g., PodAffinity) |
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 is useful for casual users who employ scheduling constraints (e.g., PodAffinity) | |
It is useful for casual users who employ scheduling constraints (e.g., inter-Pod affinity) |
kind: Pod | ||
apiVersion: v1 | ||
metadata: | ||
annotations: | ||
scheduler-simulator/bind-result: '{"DefaultBinder":"success"}' | ||
scheduler-simulator/filter-result: >- | ||
{"node-jjfg5":{"NodeName":"passed","NodeResourcesFit":"passed","NodeUnschedulable":"passed","TaintToleration":"passed"},"node-mtb5x":{"NodeName":"passed","NodeResourcesFit":"passed","NodeUnschedulable":"passed","TaintToleration":"passed"}} | ||
scheduler-simulator/finalscore-result: >- | ||
{"node-jjfg5":{"ImageLocality":"0","NodeAffinity":"0","NodeResourcesBalancedAllocation":"52","NodeResourcesFit":"47","TaintToleration":"300","VolumeBinding":"0"},"node-mtb5x":{"ImageLocality":"0","NodeAffinity":"0","NodeResourcesBalancedAllocation":"76","NodeResourcesFit":"73","TaintToleration":"300","VolumeBinding":"0"}} | ||
scheduler-simulator/permit-result: '{}' | ||
scheduler-simulator/permit-result-timeout: '{}' | ||
scheduler-simulator/postfilter-result: '{}' | ||
scheduler-simulator/prebind-result: '{"VolumeBinding":"success"}' | ||
scheduler-simulator/prefilter-result: '{}' | ||
scheduler-simulator/prefilter-result-status: >- | ||
{"AzureDiskLimits":"","EBSLimits":"","GCEPDLimits":"","InterPodAffinity":"","NodeAffinity":"","NodePorts":"","NodeResourcesFit":"success","NodeVolumeLimits":"","PodTopologySpread":"","VolumeBinding":"","VolumeRestrictions":"","VolumeZone":""} | ||
scheduler-simulator/prescore-result: >- | ||
{"InterPodAffinity":"","NodeAffinity":"success","NodeResourcesBalancedAllocation":"success","NodeResourcesFit":"success","PodTopologySpread":"","TaintToleration":"success"} | ||
scheduler-simulator/reserve-result: '{"VolumeBinding":"success"}' | ||
scheduler-simulator/result-history: >- | ||
[{"scheduler-simulator/bind-result":"{\"DefaultBinder\":\"success\"}","scheduler-simulator/filter-result":"{\"node-jjfg5\":{\"NodeName\":\"passed\",\"NodeResourcesFit\":\"passed\",\"NodeUnschedulable\":\"passed\",\"TaintToleration\":\"passed\"},\"node-mtb5x\":{\"NodeName\":\"passed\",\"NodeResourcesFit\":\"passed\",\"NodeUnschedulable\":\"passed\",\"TaintToleration\":\"passed\"}}","scheduler-simulator/finalscore-result":"{\"node-jjfg5\":{\"ImageLocality\":\"0\",\"NodeAffinity\":\"0\",\"NodeResourcesBalancedAllocation\":\"52\",\"NodeResourcesFit\":\"47\",\"TaintToleration\":\"300\",\"VolumeBinding\":\"0\"},\"node-mtb5x\":{\"ImageLocality\":\"0\",\"NodeAffinity\":\"0\",\"NodeResourcesBalancedAllocation\":\"76\",\"NodeResourcesFit\":\"73\",\"TaintToleration\":\"300\",\"VolumeBinding\":\"0\"}}","scheduler-simulator/permit-result":"{}","scheduler-simulator/permit-result-timeout":"{}","scheduler-simulator/postfilter-result":"{}","scheduler-simulator/prebind-result":"{\"VolumeBinding\":\"success\"}","scheduler-simulator/prefilter-result":"{}","scheduler-simulator/prefilter-result-status":"{\"AzureDiskLimits\":\"\",\"EBSLimits\":\"\",\"GCEPDLimits\":\"\",\"InterPodAffinity\":\"\",\"NodeAffinity\":\"\",\"NodePorts\":\"\",\"NodeResourcesFit\":\"success\",\"NodeVolumeLimits\":\"\",\"PodTopologySpread\":\"\",\"VolumeBinding\":\"\",\"VolumeRestrictions\":\"\",\"VolumeZone\":\"\"}","scheduler-simulator/prescore-result":"{\"InterPodAffinity\":\"\",\"NodeAffinity\":\"success\",\"NodeResourcesBalancedAllocation\":\"success\",\"NodeResourcesFit\":\"success\",\"PodTopologySpread\":\"\",\"TaintToleration\":\"success\"}","scheduler-simulator/reserve-result":"{\"VolumeBinding\":\"success\"}","scheduler-simulator/score-result":"{\"node-jjfg5\":{\"ImageLocality\":\"0\",\"NodeAffinity\":\"0\",\"NodeResourcesBalancedAllocation\":\"52\",\"NodeResourcesFit\":\"47\",\"TaintToleration\":\"0\",\"VolumeBinding\":\"0\"},\"node-mtb5x\":{\"ImageLocality\":\"0\",\"NodeAffinity\":\"0\",\"NodeResourcesBalancedAllocation\":\"76\",\"NodeResourcesFit\":\"73\",\"TaintToleration\":\"0\",\"VolumeBinding\":\"0\"}}","scheduler-simulator/selected-node":"node-mtb5x"}] | ||
scheduler-simulator/score-result: >- | ||
{"node-jjfg5":{"ImageLocality":"0","NodeAffinity":"0","NodeResourcesBalancedAllocation":"52","NodeResourcesFit":"47","TaintToleration":"0","VolumeBinding":"0"},"node-mtb5x":{"ImageLocality":"0","NodeAffinity":"0","NodeResourcesBalancedAllocation":"76","NodeResourcesFit":"73","TaintToleration":"0","VolumeBinding":"0"}} | ||
scheduler-simulator/selected-node: node-mtb5x |
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.
If using this manifest unchanged, please call out that using the (unregistered) top level domain scheduler-simulator
is not a recommended practice for Kubernetes object annotations. It's code from part of the Kubernetes project but it's not following Kubernetes good practice.
If possible, change the actual code to use a more appropriate domain name (eg scheduler-simulator.sigs.k8s.io
- which would need registering) before publication. If not feasible to do that, please explain that the domain name in the key is a known bug.
I don't want to tacitly endorse poor practice with an official-looking article.
BTW, you can register annotations with a PR against k/website. We aim for this to be easy; all you need say is that the annotation is used by https://sigs.k8s.io/kube-scheduler-simulator
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.
Thanks, created kubernetes-sigs/kube-scheduler-simulator#386.
We're about to ship a new release, and we can include the fix for it. The fix should be very easy.
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.
Annotations now registered BTW
As mentioned earlier, with a limited set of tests, it is impossible to predict every possible scenario in a real-world cluster. | ||
Typically, you will test the scheduler in a small, development cluster before deploying it to production, hoping that no issues arise. | ||
|
||
[The simulator’s importing feature](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/simulator/docs/import-cluster-resources.md) |
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.
[The simulator’s importing feature](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/simulator/docs/import-cluster-resources.md) | |
The simulator's [importing](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/simulator/v0.3.0/simulator/docs/import-cluster-resources.md) | |
feature |
|
||
## What are the use cases? | ||
|
||
1. **Cluster users**: Examine if your scheduling constraints (e.g., PodAffinity, PodTopologySpread) work as intended. |
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.
1. **Cluster users**: Examine if your scheduling constraints (e.g., PodAffinity, PodTopologySpread) work as intended. | |
1. **Cluster users**: Examine if your scheduling constraints (e.g., Pod affinity, Pop topology spread) work as intended. |
2. **Cluster admins**: Assess how your cluster would behave with changes to the scheduler configuration. | ||
3. **Scheduler plugin developers**: Test your custom scheduler plugins or extenders, use the debuggable scheduler in integration tests or development clusters, and use [the syncing feature](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/simulator/docs/import-cluster-resources.md) for testing within a production-like environment. |
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.
2. **Cluster admins**: Assess how your cluster would behave with changes to the scheduler configuration. | |
3. **Scheduler plugin developers**: Test your custom scheduler plugins or extenders, use the debuggable scheduler in integration tests or development clusters, and use [the syncing feature](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/simulator/docs/import-cluster-resources.md) for testing within a production-like environment. | |
1. **Cluster admins**: Assess how your cluster would behave with changes to the scheduler configuration. | |
1. **Scheduler plugin developers**: Test your custom scheduler plugins or extenders, use the debuggable scheduler in integration tests or development clusters, or use the [syncing](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/simulator/v0.3.0/simulator/docs/import-cluster-resources.md) feature for testing within a production-like environment. |
- The site renderer does the numbering for you
- We avoid linking to trunk-like branches (main, master etc) as the link is unlikely to be long term stable.
|
||
## Getting involved | ||
|
||
The Kube-scheduler-simulator is developed by Kubernetes SIG Scheduling. Your feedback and contributions are welcome! |
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.
(nit)
The Kube-scheduler-simulator is developed by Kubernetes SIG Scheduling. Your feedback and contributions are welcome! | |
The scheduler simulator is developed by Kubernetes SIG Scheduling. Your feedback and contributions are welcome! |
|
||
The Kube-scheduler-simulator is developed by Kubernetes SIG Scheduling. Your feedback and contributions are welcome! | ||
|
||
Open issues or PRs at [Kube-scheduler-simulator repository](sigs.k8s.io/kube-scheduler-simulator) |
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.
(nit)
Open issues or PRs at [Kube-scheduler-simulator repository](sigs.k8s.io/kube-scheduler-simulator) | |
Open issues or PRs at the [kube-scheduler-simulator repository](https://sigs.k8s.io/kube-scheduler-simulator). |
|
||
A big shout out to all [the awesome contributors](https://github.com/kubernetes-sigs/kube-scheduler-simulator/graphs/contributors)! | ||
|
||
![contributors](./contributors.png) |
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 actually doesn't need a figure
shortcode, but should have a more descriptive alt
attribute.
make docker_up | ||
``` | ||
|
||
You can then access the simulator's web UI at http://localhost:3000. |
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.
(nit)
You can then access the simulator's web UI at http://localhost:3000. | |
You can then access the simulator's web UI at `http://localhost:3000`. |
This PR adds a blog post to introduce sigs/kube-scheduler-simulator.