-
Notifications
You must be signed in to change notification settings - Fork 116
ScaleTask for scaling deployments to a particular replica count #459
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
Comments
Do I understand correctly that the value added over using Might something like |
@KnVerey Such a command prints "error: no objects passed to scale". I ended up using this: kubectl get deployments --no-headers=true --output=name --selector=foo | xargs -I % kubectl scale --replicas=0 % |
Indeed you're right. I'm not sure what I had been doing last time I tried, but your example does work. Apologies for the noise. I don't think this does carry enough value to move forward. |
I was having the same problem. It was the hallowed namespace selection! You probably were missing the |
Feature request
If the maintainers agree with the feature as described here, I intend to submit a Pull Request myself.
Proposal: A
scale
task, similar toRestartTask
which patchesDeployment/spec/replicas
.Our use case is replacing the schema of a SQL database used by an application deployed by
kubernetes-deploy
. While this schema reload is happening, we want to effectively shut down application processes to prevent them from encountering and loudly reporting errors. Our plan is to scale all Deployment resources to a replica count of 0, reload the database schema, and then trigger a deployment.An alternative approach would be to perform a new deployment with the replica-count set to 0, but this requires adding logic to templates to prevent running bare pods for the likes of database migrations in the initial deployment.
The text was updated successfully, but these errors were encountered: