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

How to get access to ingress controller #273

Open
cloud-66 opened this issue Jan 27, 2023 · 1 comment
Open

How to get access to ingress controller #273

cloud-66 opened this issue Jan 27, 2023 · 1 comment
Labels
question Further information is requested

Comments

@cloud-66
Copy link
Contributor

What is the best way to get access to service in cluster through ingress-controller ? I used to use hostNetwork: true for ingress-controller in typical kubernetes bootstraped by kubeadm. Is it possible on rootless kubernetes ?
Another way is to expose nodeport of ingress-controller service
Now i'm using it by opening port with socat command

pid=$(cat $XDG_RUNTIME_DIR/usernetes/rootlesskit/child_pid)
socat -t -- TCP-LISTEN:30080,reuseaddr,fork EXEC:"nsenter -U -n -t $pid socat -t -- STDIN TCP4\:127.0.0.1\:30080"

I need more automated way. Maybe i have to create systemd service which execute this command?

If i try to use rootlessctl i get the error. How can I solve it?

 ./rootlessctl add-ports 0.0.0.0:30080:30080/tcp
error: please specify --socket or set $ROOTLESSKIT_STATE_DIR

@cloud-66 cloud-66 changed the title How to expose nodeport How to get access to ingress controller Jan 27, 2023
@AkihiroSuda
Copy link
Member

AkihiroSuda commented Jan 28, 2023

hostNetwork

Currently unsupported.

rootlessctl

Please try this
https://github.com/rootless-containers/usernetes/blob/master/rootlessctl.sh

@AkihiroSuda AkihiroSuda added the question Further information is requested label Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants