ckad
ckad copied to clipboard
Issue with 2/Application Deployment 2/Use Kubernetes Primitives
Hello: Love the course. Question, however. I am in 2/Application Deployment and 2/Use Kubernetes Primitives. I tried the commands for Task 1 shown in the answers, and this is a description of the service (see below). But when I try curl http://localhost:<Node Port> I get connection refused. I tried http and https. I also tried including the whole ip address and not just the node port. Am I missing something? Am I supposed to create a shell INTO the pod or something before I run the curl?
Name: nginx-svc
Namespace: ckad
Labels: app=nginx-deploy
Annotations:
Is it obvious what I am doing wrong?
Same for me ! As it is a NodePort
service type the service is not accessible from the outside (I guess).
After changing it to LoadBalancer
it worked !
kubectl expose deploy nginx-deploy --port=9000 --target-port=80 --type=LoadBalancer --name=nginx-svc
Then
curl localhost:9000
and you should see the HTML