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

cannot expose port 80 and 443 #17313

Closed
luatnd opened this issue Sep 27, 2023 · 6 comments
Closed

cannot expose port 80 and 443 #17313

luatnd opened this issue Sep 27, 2023 · 6 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@luatnd
Copy link

luatnd commented Sep 27, 2023

What Happened?

My purpose is map port 80 & 443 from k8s inside minikube to my host machine MacOS.

I follow this tutorial:
https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

As I can see minukube container doesn't mount the port 80 & 443:
image

As a result, I cannot reach the port 80 from my host machine:

telnet "$(minikube ip)" 80
Trying 192.168.49.2...
# hang forever

As investigated some closed issues, I tried this with no luck

minikube start   --ports=443 --ports=80
# Or
minikube start --addons=ingress --ports=80:80,443:443 --driver=docker

Tried with docker run:

docker run --hostname=minikube --env=container=docker --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --volume=/lib/modules:/lib/modules:ro --volume=minikube:/var --network=minikube --privileged --workdir=/ -p 3222:22 -p 32376:2376 -p 32443 -p 5000 -p 8443 -p 443:443 -p 80:80   --restart=no --label='created_by.minikube.sigs.k8s.io=true' --label='mode.minikube.sigs.k8s.io=minikube' --label='name.minikube.sigs.k8s.io=minikube' --label='role.minikube.sigs.k8s.io=' --runtime=runc --memory="4194304000" -t -d gcr.io/k8s-minikube/kicbase:v0.0.40@sha256:8cadf23777709e43eca447c47a45f5a4635615129267ce025193040ec92a1631

So how can I map port 80 & 443 to host without using reverse proxy?

Attach the log file

$ minikube version
minikube version: v1.31.1
commit: fd3f3801765d093a485d255043149f92ec0a695f

Operating System

macOS (Default)

Driver

Docker

@luatnd
Copy link
Author

luatnd commented Sep 27, 2023

Ah, sorry, I forgot that I can use minikube tunnel to tunnel Ingress to host port 80 & 443.
It's ok by using minikube tunnel for now.

@friedrich
Copy link

friedrich commented Jan 24, 2024

Try recreating the cluster:

minikube delete
minikube start --addons=ingress --ports=80:80,443:443

According to a comment from the PR:

It's important to note that the --ports option only applies when first creating the minikube docker container. If minikube start --ports=... is called when the minikube container already exists, then the option is ignored.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 23, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 23, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 22, 2024
@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants