Question 3 - Scale down StatefulSet
Question 3 | Scale down StatefulSet
Use context: kubectl config use-context k8s-c1-H
There are two Pods named o3db-* in Namespace project-c13. C13 management asked you to scale the Pods down to one replica to save resources.
k get pod -n project-c13 | grep o3db
o3db-0 1/1 Running 0 52s
o3db-1 1/1 Running 0 42s
# We need to know who are the controllers of this pod.
# The possible controllers are deploy, daemonset and statefulset.
k get deploy,ds,sts -n project-c13 | grep o3db
statefulset.apps/o3db 2/2 2m56s
# We can also confirm by checking
➜ k scale sts o3db -n project-c13 --replicas 1
statefulset.apps/o3db scaled
➜ k -n project-c13 get sts o3db
NAME READY AGE
o3db 1/1 4m39s