Quick quiz

Five questions to check the ideas stuck. Pick an answer; you get one try each.

1. You delete a Pod that belongs to a Deployment with replicas: 3. What happens?

{{m0a0}}Nothing; you now have 2 Pods{{m0a1}}The same Pod restarts with the same name{{m0a2}}A new Pod with a new name is created{{m0a3}}The Deployment is deleted too

{{verdict0}} The ReplicaSet notices 2 ≠ 3 and creates a fresh Pod with a new name and IP.

2. A Service has no endpoints. What's the most likely cause?

{{m1a0}}The Service type is ClusterIP{{m1a1}}Its selector doesn't match any Pod's labels{{m1a2}}The Pods have no IP address{{m1a3}}port and targetPort are the same

{{verdict1}} No endpoints means the Pharos found nobody wearing its label.

3. A Service has port: 80 and targetPort: 8080. Where must the app listen?

{{m2a0}}Port 8080{{m2a1}}Port 80{{m2a2}}Either one{{m2a3}}Port 8080 on the Node

{{verdict2}} targetPort is the container's port; port is what callers use.

4. Which part of Kubernetes picks the Node for a new Pod?

{{m3a0}}The kubelet{{m3a1}}etcd{{m3a2}}The Service{{m3a3}}The scheduler

{{verdict3}} The scheduler, our helmsman, assigns Pods to ships.

5. What's the fastest way to get a correct Deployment YAML to edit?

{{m4a0}}Copy one from memory{{m4a1}}kubectl create deployment … --dry-run=client -o yaml{{m4a2}}kubectl get pods -o yaml{{m4a3}}kubectl explain deployment

{{verdict4}} Let kubectl write the boilerplate, then edit only what you need.

{{scoreText}}

Shipshape
Try again