DEV Community

Aron Fyodor Asor
Aron Fyodor Asor

Posted on

My top 4 takeaways from Kubecon 2019

  • When your pod is terminating, it takes a while for requests to stop hitting your pod. In your pod definitions, always have a preStop with sleep 20 to allow Endpoint changes to propagate. After preStop is when Kubernetes hits your containers with a SIGTERM.

  • Always have CPU requests. Be very wary of CPU limits -- don't add them unless you really need to. This allows your container to use more CPU when it's available. But when CPU pressure comes in, your app is guaranteed the amount of CPU cycles it requested.

  • A corollary to the above: there is always tension between your cluster's utilization and stability. You can increase your utilization rate i.e. by increasing the difference between requests and limits. But that ups the chance of eviction. Reduce utilization, and you'll see less evictions. Find the balance for you.

  • Automation is not the end-all-be-all. When your automation doesn't work, someone has to fix it after all.

Top comments (0)