Chapter 9. ReplicaSets Flashcards
Why do we want to use replicas ?
Redundancy
Multiple running instances mean failure can be tolerated.
Scale
Multiple running instances mean that more requests can be handled.
Sharding
Different replicas can handle different parts of a computation in parallel.
What is a replicaSet ?
A ReplicaSet acts as a cluster-wide Pod manager, ensuring that the right types and number of Pods are running at all times.
What is a reconciliation loop ?
The actual act of managing the replicated Pods
Command to scale replicas ?
kubectl scale replicasets kuard –replicas=4
How can you scale replicas based on cpu usage ?
kubectl autoscale rs kuard –min=2 –max=5 –cpu-percent=80
How do you delete a replicaSet ?
kubectl delete rs kuard
How can you delete only the replicaSet and not the Pods ?
kubectl delete rs kuard –cascade=false