Skip to content

Latest commit

 

History

History
112 lines (73 loc) · 2.11 KB

22-Practice-Test-Services.md

File metadata and controls

112 lines (73 loc) · 2.11 KB

Practice Test - Services

Solutions to Practice test - Services

  1. How many Services exist on the system?
    kubectl get services
    

    Count the number of services (if any)

  2. Information only

  3. What is the type of the default kubernetes service?

    From the output of Q1, examine the TYPE column.

  4. What is the targetPort configured on the kubernetes service?
    $ kubectl describe service | grep TargetPort
    
  5. How many labels are configured on the kubernetes service?
    kubectl describe service
    

    ...and look for labels.

    --- OR ---

    kubectl describe service --show-labels
    
  6. How many Endpoints are attached on the kubernetes service?
    kubectl describe service
    

    ...and look for endpoints

  7. How many Deployments exist on the system now?
    kubectl get deployment
    

    Count the deployments (if any)

  8. What is the image used to create the pods in the deployment?
    kubectl describe deployment
    

    Look in the containers section.

    --- OR ---

    kubectl get deployment -o wide
    

    Look in the IMAGES column

  9. Are you able to access the Web App UI?

    Try to access the Web Application UI using the tab simple-webapp-ui above the terminal.

  10. Create a new service to access the web application using the service-definition-1.yaml file.
    vi service-definition-1.yaml
    

    Fill in the values as directed, save and exit.

    kubectl create -f service-definition-1.yaml
    
  11. Test newly deployed service.