- Take me to Practice Test
Solutions to the deploments practice test
-
Run the command
kubectl get pods
and count the number of pods.$ kubectl get pods
-
Run the command
kubectl get replicaset
and count the number of ReplicaSets.$ kubectl get replicaset (or) $ kubectl get rs
-
Run the command
kubectl get deployment
and count the number of Deployments.$ kubectl get deployment
-
Run the command
kubectl get deployment
and count the number of Deployments.$ kubectl get deployment
-
Run the command
kubectl get replicaset
and count the number of ReplicaSets.$ kubectl get replicaset (or) $ kubectl get rs
-
Run the command
kubectl get pods
and count the number of PODs.$ kubectl get pods
-
Run the command
kubectl get deployment
and count the number of PODs.$ kubectl get deployment
-
Run the command
kubectl describe deployment
and look under the containers section.$ kubectl describe deployment
Another way
$ kubectl get deployment -o wide
-
Run the command
kubectl describe pods
and look under the events section.$ kubectl describe pods
-
Run the command
kubectl describe pods
and look under the events section.$ kubectl describe pods
-
The value for
kind
is incorrect. It should beDeployment
with a capitalD
. Update the deployment defination and create the deployment.$ kubectl create -f deployment-defination-1.yaml
-
Run the command below command
$ kubectl create deployment httpd-frontend --image=httpd:2.4-alpine $ kubectl scale deplyoment httpd-frontend --replicas=3