Kubernetes Simulator

beginner · ~8 min

Give it an address

Pods come and go, and each new one gets a new IP address. Nothing should depend on a pod's IP. A Service gives a set of pods one stable address and spreads traffic across whichever of them are ready.

A Service finds its pods by label, not by name: its selector — here app=web — matches the labels the deployment puts on every pod. The pods it picks are its endpoints.

You can make one with kubectl expose, or write it as YAML and kubectl apply -f it. Type vi svc.yaml to open the editor.

Objectives

Best on a computer with a keyboard. It works on a phone, with shortcuts under the terminal.