Kubernetes v1.36: Mastering In-Place Vertical Scaling for Pods
In the fast-paced world of cloud-native applications, resource management is critical. Kubernetes v1.36 addresses this need with in-place vertical scaling for pod-level resources, allowing you to modify resource limits on the fly. This feature minimizes downtime and enhances efficiency, enabling you to respond to changing workloads without the overhead of restarting containers.
When you initiate a pod-level resize, the Kubelet interprets this as a resize event for all containers within that pod. The key here is the resizePolicy defined for each container. If the policy is set to NotRequired, the Kubelet dynamically updates the cgroup limits via the Container Runtime Interface (CRI). However, if the policy is set to RestartContainer, the container will restart to safely apply the new resource limits. This flexibility allows for a tailored approach to resource management based on your application’s needs.
In production, understanding the implications of the restartPolicy is crucial. The default is NotRequired, which is beneficial for minimizing disruptions. However, be cautious when using RestartContainer, as it can lead to temporary unavailability of your application. Always test these configurations in a staging environment before rolling them out to production. This feature is still in beta, so keep an eye on updates and community feedback to ensure stability and performance in your deployments.
Key takeaways
- →Utilize the InPlacePodLevelResourcesVerticalScaling feature to adjust resource budgets without restarts.
- →Set the restartPolicy to NotRequired for minimal disruption during resource updates.
- →Understand the implications of RestartContainer to avoid unnecessary downtime.
Why it matters
This feature significantly reduces downtime during resource adjustments, allowing for more responsive scaling in production environments. It enables teams to manage resources more effectively, leading to better application performance and resource utilization.
Code examples
kubectl patch pod shared-pool-app --subresource resize --patch
'{When NOT to use this
The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.
Want the complete reference?
Read official docsUnified observability — logs, uptime monitoring, and on-call in one place. Used by 50,000+ engineering teams to ship faster and sleep better.
Try Better Stack free →Unlocking Efficiency: Amazon EKS Auto Mode Meets Istio Ambient Mesh
Streamline your Kubernetes workloads with the powerful combination of Amazon EKS Auto Mode and Istio Ambient Mesh. This integration automates node management while providing seamless mutual TLS encryption across your services. Discover how to leverage these technologies for enhanced security and performance.
Scaling StarRocks on EKS: Harnessing KEDA and Karpenter for OLAP Efficiency
In the world of enterprise OLAP workloads, scaling efficiently is crucial. By leveraging KEDA for autoscaling and Karpenter for node provisioning on Amazon EKS, you can dynamically adjust your StarRocks cluster to meet fluctuating query demands without data movement.
Scaling StarRocks on EKS: Harnessing KEDA and Karpenter for OLAP Power
Unlock the full potential of your OLAP workloads with StarRocks on Amazon EKS. Learn how KEDA and Karpenter enable near-instant scaling of compute resources while maintaining a cost-effective shared-data architecture.
Get the daily digest
One email. 5 articles. Every morning.
No spam. Unsubscribe anytime.