For below question:
For this question, please set the context to cluster1
by running:
kubectl config use-context cluster1
We deployed an app using a deployment called web-dp-cka06-trb
. it’s using the httpd:latest
image. There is a corresponding service called web-service-cka06-trb
that exposes this app on the node port 30005
. However, the app is not accessible!
Troubleshoot and fix this issue. Make sure you are able to access the app using curl http://kodekloud-exam.app:30005
command.
I bring up the PODs, Deployment,
student-node ~ ➜ kubectl get pods
NAME READY STATUS RESTARTS AGE
demo-pod-cka29-trb 1/1 Running 0 46m
nginx-cka01-trb 0/2 CrashLoopBackOff 13 (3m42s ago) 45m
nodeapp-dp-cka08-trb-74f948c4b8-748lc 1/1 Running 0 46m
web-dp-cka06-trb-5ddc9f44c5-k5q2z 1/1 Running 0 18m
student-node ~ ➜ kubectl get deployments.apps
NAME READY UP-TO-DATE AVAILABLE AGE
nodeapp-dp-cka08-trb 1/1 1 1 46m
web-dp-cka06-trb 1/1 1 1 46m
At last step there is selector mismatch in service, i try to change the label as per deployment but still no progress:
student-node ~ ➜ curl http://kodekloud-exam.app:30005
curl: (7) Failed to connect to kodekloud-exam.app port 30005: Connection refused
Can you please help where i am doing the mistake?