Scale a Deployment and Verify Replicas
A 4-step recipe with Kubernetes. We can help you get access.
Recipe · 4 steps
Scale a Deployment and Verify Replicas
with Kubernetes
Change a deployment's replica count via the scale subresource and verify.
- Confirm the deployment exists and capture its current status before changing the replica count.
- Read the scale subresource to record the replica count the cluster currently considers desired, before this workflow changes it.
- Replace the scale subresource with the new desired replica count. The deployment controller adds or removes pods to converge on the new value.
- List the pods carrying the deployment's label to observe the scaling result. Pods may still be Pending immediately after scaling up.
What you'll need to have ready
- namespace: The namespace containing the deployment.
- deploymentName: The name of the deployment to scale.
- replicas: The desired number of replicas to scale to.
- labelSelector: Label selector matching the deployment's pods (e.g. app=nginx).
For your developer
Arazzo workflow kubernetes:scale-deployment, 4 operations: getNamespacedDeployment → getNamespacedDeploymentScale → replaceNamespacedDeploymentScale → listNamespacedPods. Specs on APIs.io.