Sum-up for my experience about using Kubernetes in production.

NOTE: This was written in July, 2018, maybe something has changed.

  • Code as Infrastructure? Code decides Infrastructure.
    • Writing bad code could crash your pod.
    • Code with good performance could save your money.
  • HPA default sync period is 30 secs
    • Too long for some bursts which cause high loading peak.
    • If you are using GKE, you cannot change this.
  • Bad liveness probe settings could destory high availability
    • If your condition is way too scrict, your pod will keep restarting.
  • minReadySecs and initialDelaySecs are important.
    • Without these two settings, your users might get 502 Bad Gateway Error while rolling update.
  • maxSurge and maxUnavailable
    • Rolling update speed and availability
  • targetCPUUtilizationPercentage
    • Is the CPU utilization percentage of the node that pods are running on.
  • terminationGracePeriodSeconds
  • Resources
    • CPU and Memory threshold is very important.
    • Pods will be killed if you set the threshold too low.
    • It's a waste if you set the threshold too high.
  • Tools
    • kubectx, kubens

Share


Donation

如果覺得這篇文章對你有幫助, 除了留言讓我知道外, 或許也可以考慮請我喝杯咖啡, 不論金額多寡我都會非常感激且能鼓勵我繼續寫出對你有幫助的文章。

If this blog post happens to be helpful to you, besides of leaving a reply, you may consider buy me a cup of coffee to support me. It would help me write more articles helpful to you in the future and I would really appreciate it.


Related Posts