Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.02 KB

File metadata and controls

53 lines (39 loc) · 1.02 KB

ReplicaSet

In this training, we will learn about Replicasets.

Navigate to the folder 05_replicasets from CLI, before you get started.

Inspect the replicaset.yaml definition file and create the replicaset

cat replicaset.yaml
kubectl create -f replicaset.yaml

Find and fix the two issues in there.

Take a look at the number of Pods

kubectl get pods

Scale the number of replicas to 3

kubectl scale replicaset my-replicaset --replicas 3

Open second terminal to watch the Pods

watch -n 1 kubectl get pods

Delete one of the Pods

kubectl delete pod <POD-NAME>

Open second terminal to watch the Pods

watch -n 1 kubectl get pods

Cleanup

Delete the ReplicaSet

kubectl delete replicaset my-replicaset

Verify if replicaset is delete including all the associated pods

kubectl get rs,po

Jump to Home | Previous Training | Next Training