kubectl-patch Verified for current stable LTS

Kubectl Patch Command: Update Deployment Replicas Scale

Use for update deployment replicas scale with Kubectl Patch. Exact CLI syntax to update deployment replicas scale using Kubectl Patch.

When to use this: Use for update deployment replicas scale with Kubectl Patch.

Command Syntax

kubectl patch deploy <deployment_name> --subresource 'scale' --type 'merge' -p '{"spec":{"replicas":<number_of_replicas>}}'

Command Breakdown

--subresource
Command Option
Tool-specific option used by this command invocation.
--type
Command Option
Tool-specific option used by this command invocation.
-p
Command Option
Tool-specific option used by this command invocation.

FAQ

Purpose: Exact syntax to update deployment replicas scale using Kubectl Patch.

Test path: Replace placeholders and run destructive commands in a disposable workspace first.

Flag behavior: Tool version, platform, and shell can change behavior.

Improve This Command

Suggest a correction, safer default, or version-specific note for this entry.

Related Operations

Back to Kubectl Patch directory