Mock CKA scenario-based practice test
You have two virtual machines, master-0
and worker-0
; please complete the following mock scenarios.
Scenario 1
Deploy a new deployment, nginx
, with the latest image of nginx
for two replicas in a namespace called packt-app
. The container is exposed on port 80
. Create a service type of ClusterIP
within the same namespace. Deploy a sandbox-nginx
pod and make a call using curl
to verify the connectivity to the nginx
service.
Scenario 2
Expose the nginx
deployment with the NodePort
service type; the container is exposed on port 80
. Use the test-nginx
pod to make a call using curl
to verify the connectivity to the nginx
service.
Scenario 3
Make a call using wget
or curl
from the machine within the same network as that node, to verify the connectivity with the nginx
NodePort
service through the correct port.
Scenario 4
Use the sandbox-nginx
pod and nslookup
for the IP address of the nginx
NodePort
service. See what is returned...