🎓 A1Learner
🔍
0 of 51 lessons completed

Kubernetes: What It Is Used For

Kubernetes is used for running apps that need many containers across many machines. It deploys apps, scales them, and heals them when they fail.

Deploy an app

You hand Kubernetes a description of your app. It starts the containers for you.

kubectl get deployments

Scale an app

Traffic grows. Kubernetes adds copies. Traffic falls. Kubernetes removes them.

kubectl get deployments

Heal a failed app

A container crashes. Kubernetes starts a replacement without waiting for a human.

kubectl get pods

Run the same app everywhere

The same description runs on a laptop cluster and on a cloud cluster.

kubectl get nodes

Example

kubectl get deployments

Key points

  • Deployment: the act of putting a new version of an app into service.
  • Scaling: adding or removing copies of an app as demand changes.
  • Self-healing: replacing a failed container with a fresh copy automatically.
  • Use Kubernetes to run a web app that must stay up day and night.
  • Use Kubernetes to run work that processes data on a schedule.
  • Use Kubernetes to run the same app in many places with the same setup.

In this example, the command shows how many copies are running. The output shows five copies of the web app, all ready. Kubernetes keeps five copies running on machines with room.

Note

Kubernetes is not for a single small app on one machine.

Try it Yourself

Edit the code, then press Run.

Running is simulated · Rust Playground

Exercise

What is Kubernetes used for?