4 Automated operations

 

This chapter covers

  • Creating long-lasting, reliable application deployments
  • Having Kubernetes keep your applications running without your intervention
  • Updating applications without downtime

Kubernetes can automate many operations, like restarting your container if it crashes and migrating your application in the case of hardware failure. Thus, Kubernetes helps to make your deployments more reliable without you needing to monitor them 24/7. These automated operations are one of the key value propositions of Kubernetes, and understanding them is an essential step to taking full advantage of everything Kubernetes has to offer.

Kubernetes can also help you update your application without outages and glitches by booting the new version and monitoring its status to ensure it’s ready to serve traffic before removing the old version.

To help Kubernetes help keep your application running without downtime during normal operations and upgrades, you need to provide certain information about the state of your application with a process known as health checks. In the next section, we’ll go through adding the various health checks to your application and, in a later section, how these can be used with Kubernetes’ built-in rollout strategies to update your application without glitches or downtime.

4.1 Automated uptime with health checks

4.1.1 Liveness and readiness probes

4.1.2 Adding a readiness probe

4.1.3 Adding a liveness probe

4.1.4 Designing good health checks

4.1.5 Rescheduling unready containers

4.1.6 Probe types

4.2 Updating live applications

4.2.1 Rolling update strategy

4.2.2 Re-create strategy

4.2.3 Blue/green strategy

4.2.4 Choosing a rollout strategy

Summary

sitemap