Question
Create a new deployment called web-003.
Scale the deployment to 3 replicas.
Make sure the desired number of pods is always running.
Answer
It seems to be an easy answer:
kubectl create deployment web-003 --image=nginx --replicas=3
Verify:
kubectl get deploy
kubectl get po
Seems that during the verifications no pods are up, let's go into the deep.kubectl -n kube-system get po
Here in the output we observed that kube-controller-manager-controlplane pod is in the CrashLoopBackOff state.kubectl -n kube-system logs kube-controller-manager-controlplane
kubectl -n kube-system describe po kube-controller-manager-controlplane
During the inspection can be noticed that the binary kube-controller-man cannot be found. Apparently it should be kube-controller-manager.kubectl get deploy -w