6: Kubernetes Deployments

This chapter shows you how to use Deployments to add cloud-native features such as self-healing, scaling, rolling updates, and versioned rollbacks to stateless apps on Kubernetes.

The chapter is divided as follows:

  • Deployment theory
  • Create a Deployment
  • Manually scale an app
  • Perform a rollout
  • Perform a rollback

Deployment theory

Deployments are the most popular way of running stateless apps on Kubernetes. They add self-healing, scaling, rollouts, and rollbacks.

Consider a quick example.

Assume you have a requirement for a web app that needs to be resilient, scale on demand, and be frequently updated. You write the app, containerize it, and define it in a Pod YAML so it can run on Kubernetes. You then wrap the Pod ...

Get The Kubernetes Book - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.