Practice Test - Services
- Take me to Practice Test
Solutions to Practice test - Services
-
How many Services exist on the system?
kubectl get servicesCount the number of services (if any)
-
Information only
-
What is the type of the default kubernetes service?
From the output of Q1, examine the
TYPEcolumn. -
What is the targetPort configured on the kubernetes service?
$ kubectl describe service | grep TargetPort -
How many labels are configured on the kubernetes service?
kubectl describe service…and look for labels.
--- OR ---
kubectl describe service --show-labels -
How many Endpoints are attached on the kubernetes service?
kubectl describe service…and look for endpoints
-
How many Deployments exist on the system now?
kubectl get deploymentCount the deployments (if any)
-
What is the image used to create the pods in the deployment?
kubectl describe deploymentLook in the containers section.
--- OR ---
kubectl get deployment -o wideLook in the
IMAGEScolumn -
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.
-
Create a new service to access the web application using the service-definition-1.yaml file.
vi service-definition-1.yamlFill in the values as directed, save and exit.
kubectl create -f service-definition-1.yaml -
Test newly deployed service.