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 docs35% off the CKA and other certifications with code OCT26NONCYBER, or 40% off Kubernetes security certs (CKS, KCSA) with OCT26CYBER.
Kubernetes Autoscaling: Adapting to AI Workloads
AI workloads are changing the game for Kubernetes autoscaling. With dynamic resource allocation, your autoscaler needs to consider not just node count but also the right node shape for the job. Dive into the specifics of how this impacts your deployments.
Deploying n8n on EKS: Mastering Queue Mode for Production
Running n8n in production is a challenge, especially under heavy traffic. Learn how to leverage queue mode on EKS to manage workflows effectively while ensuring reliability and scalability.
Unlocking Workloads with SIG Apps: The Heart of Kubernetes
SIG Apps is crucial for managing workloads in Kubernetes, ensuring your applications run smoothly. With controllers like Deployments and StatefulSets, it defines how workloads are created and scaled. Dive in to understand its impact on your production environment.
Get the daily digest
One email. 5 articles. Every morning.
No spam. Unsubscribe anytime.