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

blog: introducing kube-scheduler-simulator #47104

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

sanposhiho
Copy link
Member

@sanposhiho sanposhiho commented Jul 6, 2024

This PR adds a blog post to introduce sigs/kube-scheduler-simulator.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 6, 2024
@k8s-ci-robot k8s-ci-robot added the area/blog Issues or PRs related to the Kubernetes Blog subproject label Jul 6, 2024
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Jul 6, 2024
Copy link

netlify bot commented Jul 6, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 67c6b09
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67a19a32292a4600081ac153
😎 Deploy Preview https://deploy-preview-47104--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 site configuration.

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/
Copy link
Member

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.

Copy link
Member Author

@sanposhiho sanposhiho Jul 10, 2024

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.

Would you recommend creating a blog post in kubernetes.dev too? What's the general difference between those two blog websites?

Copy link
Contributor

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?

Copy link
Member Author

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?

Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Jul 10, 2024
@sanposhiho
Copy link
Member Author

sanposhiho commented Jul 10, 2024

updated to use figure

@Okabe-Junya
Copy link
Member

Okabe-Junya commented Jul 13, 2024

FYI: related issue - #39776

Copy link
Contributor

@nate-double-u nate-double-u left a 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:

@sanposhiho
Copy link
Member Author

Addressed the points from @nate-double-u.

Copy link
Contributor

@Ritikaa96 Ritikaa96 left a comment

Choose a reason for hiding this comment

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

nit(optional)

@Ritikaa96
Copy link
Contributor

Ritikaa96 commented Jul 25, 2024

The overall content LGTM. Thanks for the contribution @sanposhiho

@sanposhiho sanposhiho requested a review from Ritikaa96 July 26, 2024 05:10
@sanposhiho
Copy link
Member Author

Fixed.

@sanposhiho sanposhiho requested a review from tengqm November 13, 2024 09:28
@sanposhiho
Copy link
Member Author

sanposhiho commented Jan 6, 2025

@tengqm @sftim How can I get it to move forward? It's been a long time, and I'd like to make sure it's tracked.

@tengqm
Copy link
Contributor

tengqm commented Jan 6, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 2025
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

We'll need to assign a publication date for this.

Good to know it looks good to publish, but let's ensure the date is right. How about the 22nd of January @sanposhiho ?

/lgtm cancel
because of that concern about a date

/hold
until we have an agreed, future publication date

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 6, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 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 ask for approval from sftim. 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

@sanposhiho
Copy link
Member Author

@sftim Yes, looks great. I updated the date on the tag.

@sanposhiho
Copy link
Member Author

sanposhiho commented Jan 24, 2025

@sftim we missed the date. What's your next suggestion for the publish date?

@sanposhiho sanposhiho requested a review from sftim February 4, 2025 04:40
@sftim
Copy link
Contributor

sftim commented Feb 11, 2025

Because it's now marked as a draft
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 11, 2025
@@ -0,0 +1,138 @@
---
layout: blog
title: "Introducing Kube-scheduler-simulator"
Copy link
Member

Choose a reason for hiding this comment

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

would it be more reader-friendly to use the full name?

Suggested change
title: "Introducing Kube-scheduler-simulator"
title: "Introducing Kubernetes scheduler simulator"

Copy link
Member

Choose a reason for hiding this comment

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

At a minimum, do not upper case the Kube- part as you don't do it in blog text

---

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.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Thus, anyone utilizing Kubernetes relies on the scheduler.
Thus, anyone utilizing Kubernetes relies on a scheduler.

Why "the" scheduler? There may be customer schedulers as well, right?

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.

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/).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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/).
The [kube-scheduler-simulator](https://sigs.k8s.io/kube-scheduler-simulator) is a simulator for the Kubernetes scheduler, started as a [Google Summer of Code 2021](https://summerofcode.withgoogle.com/) project developed by me (Kensei Nakada) and later received a lot of contributions.

Also with any GSoC projects it is a good practice to mention the mentor name as well as typically mentor puts a lot of effort into project success. Since it is 3 years past, not sure how important this is.

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/).
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., inter-Pod affinity)
Copy link
Member

Choose a reason for hiding this comment

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

nit: link the https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity

Suggested change
It is useful for casual users who employ scheduling constraints (e.g., inter-Pod affinity)
It is useful for casual users who employ scheduling constraints (e.g., [inter-Pod affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity))

Also, testing your scheduler is a complex challenge.
There are countless patterns of operations executed within a real cluster, making it impractical to anticipate every scenario with a finite number of tests.
More often than not, bugs are discovered only when the scheduler is deployed in an actual cluster.
Actually, many bugs are reported by users after we ship the release, and the bugs are found
Copy link
Member

Choose a reason for hiding this comment

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

who "we"? tetrate? Maintainers of Kube-scheduler-simulator? Is it an appropriate use of "we" here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean anyone who develop (custom) schedulers. What would sound the most natural? "you"? or should I say specifically "anyone who develop (custom) schedulers"

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)
provides a solution by allowing you to simulate deploying a new scheduler version in a production-like environment without impacting your live workloads.
Copy link
Member

Choose a reason for hiding this comment

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

who "you"?

Copy link
Member Author

Choose a reason for hiding this comment

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

I meant anyone who's using this project. What's the better way?

[The simulator’s importing feature](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/simulator/docs/import-cluster-resources.md)
provides a solution by allowing you to simulate deploying a new scheduler version in a production-like environment without impacting your live workloads.

By continuously syncing between your production cluster and the simulator, you can safely test a new scheduler version with the same resources your production cluster handles.
Copy link
Member

Choose a reason for hiding this comment

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

Is it referring to the scheduler maintainers? Or customer scheduler developers? Clarify "your" here. Are you suggesting Kubernertes scheduler maintainers to import their test cluster as a test to Kubernetes codebase?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same, I mean "you" equals whoever use this project. Whoever use this project can test their custom scheduler with their production cluster's resources.


## Getting started

The simulator only requires Docker to be installed on your machine; a Kubernetes cluster is not necessary.
Copy link
Member

Choose a reason for hiding this comment

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

how will it access the cluster for the use cases listed above? This is very confusing for me, I do not know what to expect when I run this. If it doesn't need a cluster, what scheduler version will it even use? Which feature gates enabled? Is it compatible with [my cloud] scheduler?

Copy link
Member Author

Choose a reason for hiding this comment

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

how will it access the cluster for the use cases listed above?

It internally runs kwok cluster which you can access.

Regarding other points, we don't have compatible matrics or the feature gate control yet, which we have to improve.

@@ -0,0 +1,138 @@
---
layout: blog
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to refer the article: https://www.cncf.io/blog/2022/08/24/writing-your-own-scheduler-with-kube-scheduler-simulator/? Not sure what is the relashinship here between articles

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't know that article, and I don't want to, honestly.


## Getting involved

The scheduler simulator is developed by Kubernetes SIG Scheduling. Your feedback and contributions are welcome!
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The scheduler simulator is developed by Kubernetes SIG Scheduling. Your feedback and contributions are welcome!
The scheduler simulator is developed by [Kubernetes SIG Scheduling](https://github.com/kubernetes/community/blob/master/sig-scheduling/README.md#kube-scheduler-simulator). Your feedback and contributions are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/blog Issues or PRs related to the Kubernetes Blog subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Ready for review
Development

Successfully merging this pull request may close these issues.

10 participants