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

Trouble following tutorial Using a Service to Expose Your App #42777

Closed
joeythomaschaske opened this issue Aug 29, 2023 · 8 comments
Closed

Trouble following tutorial Using a Service to Expose Your App #42777

joeythomaschaske opened this issue Aug 29, 2023 · 8 comments
Assignees
Labels
needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@joeythomaschaske
Copy link

joeythomaschaske commented Aug 29, 2023

Following the steps here I get to the step where I create a NodePort service and use curl to access it.

Now we can test that the app is exposed outside of the cluster using curl, the IP address of the Node and the externally exposed port:

curl http://"$(minikube ip):$NODE_PORT"

And we get a response from the server. The Service is exposed.

I do not get a response and eventually get the error

curl: (28) Failed to connect to 192.168.49.2 port 30140 after 75007 ms: Couldn't connect to server

Additionally the docs say there should be an external IP assigned after adding a NodePort service

We have a Service called kubernetes that is created by default when minikube starts the cluster. To create a new service and expose it to external traffic we'll use the expose command with NodePort as parameter.

kubectl expose deployment/kubernetes-bootcamp --type="NodePort" --port 8080

Let's run again the get services subcommand:

kubectl get services

We have now a running Service called kubernetes-bootcamp. Here we see that the Service received a unique cluster-IP, an internal port *and an external-IP (the IP of the Node).*

However I don't see this

% kubectl get services
NAME                  TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
kubernetes            ClusterIP   10.96.0.1        <none>        443/TCP          160m
kubernetes-bootcamp   NodePort    10.107.221.142   <none>        8080:30552/TCP   6m8s

Running minikube service kubernetes-bootcamp does work to expose it though

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 29, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sftim
Copy link
Contributor

sftim commented Aug 29, 2023

/retitle Trouble following tutorial Using a Service to Expose Your App

@k8s-ci-robot k8s-ci-robot changed the title Using a Service to Expose Your App Trouble following tutorial Using a Service to Expose Your App Aug 29, 2023
@dipesh-rawat
Copy link
Member

Duplicate related issues we already have #41438 #40645 #42713

@Affan-7
Copy link
Contributor

Affan-7 commented Sep 3, 2023

Duplicate related issues we already have #41438 #40645 #42713

Let's fix this, a lot of people are facing this issue.

/assign

@sftim
Copy link
Contributor

sftim commented Nov 25, 2023

/triage duplicate

@k8s-ci-robot k8s-ci-robot added the triage/duplicate Indicates an issue is a duplicate of other open issue. label Nov 25, 2023
@adityasamant25
Copy link
Contributor

#40645 is now closed.
I believe it is sufficient to close this issue as well.

@dipesh-rawat
Copy link
Member

Looks like a fix has been delivered. Closing this issue in acknowledgment of the contributor's comment indicating the implementation of the fix.

/close

@k8s-ci-robot
Copy link
Contributor

@dipesh-rawat: Closing this issue.

In response to this:

Looks like a fix has been delivered. Closing this issue in acknowledgment of the contributor's comment indicating the implementation of the fix.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants