Skip to content

Latest commit

 

History

History
126 lines (85 loc) · 2.38 KB

16-Practice-Tests-Deployments.md

File metadata and controls

126 lines (85 loc) · 2.38 KB

Practice Test - Deployments

Solutions to the deploments practice test

  1. Run the command kubectl get pods and count the number of pods.

    $ kubectl get pods
    
  2. Run the command kubectl get replicaset and count the number of ReplicaSets.

    $ kubectl get replicaset (or)
    $ kubectl get rs
    
  3. Run the command kubectl get deployment and count the number of Deployments.

    $ kubectl get deployment
    
  4. Run the command kubectl get deployment and count the number of Deployments.

    $ kubectl get deployment
    
  5. Run the command kubectl get replicaset and count the number of ReplicaSets.

    $ kubectl get replicaset (or)
    $ kubectl get rs
    
  6. Run the command kubectl get pods and count the number of PODs.

    $ kubectl get pods
    
  7. Run the command kubectl get deployment and count the number of PODs.

    $ kubectl get deployment
    
  8. Run the command kubectl describe deployment and look under the containers section.

    $ kubectl describe deployment
    

    Another way

    $ kubectl get deployment -o wide
    
  9. Run the command kubectl describe pods and look under the events section.

    $ kubectl describe pods
    
  10. Run the command kubectl describe pods and look under the events section.

    $ kubectl describe pods
    
  11. The value for kind is incorrect. It should be Deployment with a capital D. Update the deployment defination and create the deployment.

    $ kubectl create -f deployment-defination-1.yaml
    
  12. Run the command below command

    $ kubectl create deployment httpd-frontend --image=httpd:2.4-alpine 
    $ kubectl scale deplyoment httpd-frontend --replicas=3