Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 2/Application Deployment 2/Use Kubernetes Primitives #34

Open
Rasputin2 opened this issue Nov 2, 2023 · 1 comment
Open

Comments

@Rasputin2
Copy link

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: 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:
Selector: app=nginx-deploy
Type: NodePort
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.107.49.104
IPs: 10.107.49.104
Port: 9000/TCP
TargetPort: 80/TCP
NodePort: 32543/TCP
Endpoints: 10.244.0.36:80,10.244.0.37:80,10.244.0.38:80 + 1 more...
Session Affinity: None
External Traffic Policy: Cluster
Events:

Is it obvious what I am doing wrong?

@ChrisProlls
Copy link

ChrisProlls commented Mar 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants