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 →Streamline Your Hybrid Kubernetes Networking with EKS Hybrid Nodes Gateway
Hybrid cloud environments are complex, but the Amazon EKS Hybrid Nodes gateway simplifies networking between on-premises and cloud resources. By leveraging Cilium's VXLAN Tunnel Endpoint feature, it creates seamless connections that keep your applications running smoothly.
AI Sandboxing: Kubernetes' Next Frontier
AI sandboxing is revolutionizing how we think about workload isolation in Kubernetes. By eliminating the shared Linux kernel, we can prevent exploits from cascading across workloads. This architectural shift is crucial for securing AI applications in production.
Mastering Memory QoS in Kubernetes v1.36: Tiered Memory Protection Explained
Kubernetes v1.36 introduces Memory QoS, a game-changer for managing container memory. This feature leverages cgroup v2 to provide tiered memory protection, ensuring your critical workloads get the resources they need without starving others.
Get the daily digest
One email. 5 articles. Every morning.
No spam. Unsubscribe anytime.