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

Tutorial “Using a Service to Expose Your App” doesn't mention minikube limitation(s) for Services #41438

Closed
lbse opened this issue Jun 3, 2023 · 12 comments
Labels
language/en Issues or PRs related to English language priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@lbse
Copy link

lbse commented Jun 3, 2023

As a learner, took me some time to learn that with minikube the service isn't directly accessible without a service tunnel.

The curl call would return connection refused and I couldn't understand why. What I needed was:

$ minikube service kubernetes-bootcamp --url

The documentation is at https://minikube.sigs.k8s.io/docs/handbook/accessing/#getting-the-nodeport-using-the-service-command.

This applies to those learning and using minikube.

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

lbse commented Jun 3, 2023

It relates to this page: https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/

Where someone might be using expose for the first time.

@sftim
Copy link
Contributor

sftim commented Jun 3, 2023

/retitle Tutorial “Using a Service to Expose Your App” doesn't mention minikube limitation(s) for Services
/language en

@k8s-ci-robot k8s-ci-robot changed the title Using a Service to Expose Your App Tutorial “Using a Service to Expose Your App” doesn't mention minikube limitation(s) for Services Jun 3, 2023
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Jun 3, 2023
@sftim
Copy link
Contributor

sftim commented Jun 3, 2023

/triage accepted
/priority backlog

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 3, 2023
@utkarsh-singh1
Copy link
Contributor

utkarsh-singh1 commented Jun 5, 2023

Hi @lbse , I think it is mentioned here to How to access the pods using NodePort -

NodePort - Exposes the Service on the same port of each selected Node in the cluster using NAT. Makes a Service accessible from outside the cluster using <NodeIP>:<NodePort>.

You can get NodeIP by running -
minikube ip

@utkarsh-singh1
Copy link
Contributor

utkarsh-singh1 commented Jun 5, 2023

You can access pod from inside the node -

  • Get IP address of pod ,

kubectl get pods -o wide

  • You can ssh into the node using -

minikube ssh - for the single node cluster

  • and curl on to the pod

curl ip_of_pod

@utkarsh-singh1
Copy link
Contributor

utkarsh-singh1 commented Jun 5, 2023

Hi @sftim , i think it would be better if we post the output of the commands in the code format like -

kubectl get svc -o wide

o/p ->

NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE   SELECTOR
kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   33d   <none>

it could help beginners to match their output with the given.

@afbjorklund
Copy link

@craigcomstock
Copy link
Contributor

It would seem that the command minikube service kubernetes-bootcamp might be more universal although annoying since it veers away from the command line. I don't see a way to use minikube service kubernetes-bootcamp --url along with a curl command on macos w/ docker desktop either since it starts another proxy so doesn't lend itself to a one-liner well.

@kumarankit999
Copy link

So, What's Update on this Issue??

@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
language/en Issues or PRs related to English language priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants