-
Notifications
You must be signed in to change notification settings - Fork 143
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
simulator: synchronically replicate cluster state from a real cluster to a fake one for the scheduler testing #327
Comments
I'm also interested in this feature. |
/retitle simulator: synchronically replicate cluster state from a real cluster to a fake one for the scheduler testing I'll make it in the simulator, on second thought. |
/priority next-release |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
Our company is interested in giving it a try. May I ask you to assign me? |
/assign @utam0k |
Hi! I'd like to take over this issue. Could you assign me? |
/unassign |
When it starts to sync, it won't sync pods that are already exist in the real cluster. But is it okay because they can be imported by enabling |
Anyway I'll proceed to implement in the following steps.
|
It will. The syncer's event handler propagates existing Pods to the fake cluster when it starts. |
I see. So the syncer will add all the pods regardless of whether they are scheduled or not, right? If so, it might be a problem when already scheduled pods (users manually specify But it's an edge case that only occurs occasionally. Let's discuss the problem in a following issue. I'll do the first implementation in the way you say. |
We don't sync update event of scheduled Pods, but we can sync addition events of them. |
/assign
/kind feature
This issue proposes a new simple component to keep replicating the state from a prod cluster to a fake cluster.
background
Testing the scheduler is a complex challenge. There are countless patterns of operations executed within a 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.
Having a development or sandbox environment for testing the scheduler—or, indeed, any Kubernetes controllers—is a common practice. However, this approach falls short of capturing all the potential scenarios that might arise in a production cluster. It’s an inevitable truth that a development cluster never sees the exact same use or exhibits the same behavior as its production counterpart, with notable differences in workload sizes and scaling dynamics.
User story
We have a custom scheduler which has a co-scheduling feature.
We want to test it in a cluster that gets similar resources as our production cluster. But, our production cluster is much bigger than our development cluster and it's unrealistic to catch all bugs there.
Resources to sync
We shouldn't simply do that, we have to think about what to sync and what not to.
All resources involved in the scheduling should be synced.
And, we should make it configurable to select which resources to sync, given everyone could have a different scheduler plugin which schedules Pods based on anything.
By default, we should sync:
Scheduled Pods
We cannot simply sync all changes to Pods, because the real cluster has the scheduler, and it schedules all Pods in the cluster.
If we simply synced all changes to Pods, the scheduling result would also be synced. (and may conflicted with the decision of another scheduler which is in a fake cluster.)
So, we don't sync any of updated events to scheduled Pods.
Pods are synced like:
It means that the scheduling results may be different between a real cluster and a fake cluster. But, it's OK.
Our purpose is to create a fake cluster for testing the scheduling, which gets the same load as the production cluster.
The text was updated successfully, but these errors were encountered: