scale: Change the replica count of a Deployment, ReplicaSet, or StatefulSet imperatively. kubectl scale changes the number of replicas of a Deployment, StatefulSet or ReplicaSet directly: kubectl scale deployment web --replicas=5. It is useful for quick reactions, such as adding capacity during unexpected traffic or scaling a worker to zero to pause it.
The change exists only in the cluster. If your manifests in Git say three replicas, the next deploy sets it back to three, and a GitOps tool may revert it within minutes. A HorizontalPodAutoscaler will also override manual scaling. For lasting changes, update the manifests or the autoscaler's limits. Use kubectl scale for temporary adjustments and remember to record why you did it.
Create production-ready Kubernetes manifests for Deployments, Services, ConfigMaps, and Secrets following best practices and security standards. Use when generating Kubernetes YAML manifests, creating K8s resources, or implementing production-grade Kubernetes configurations.
Design, organize, and manage Helm charts for templating and packaging Kubernetes applications with reusable configurations. Use when creating Helm charts, packaging Kubernetes applications, or implementing templated deployments.
Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.