How to get access to ingress controller
cloud-66 opened this issue · comments
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
hostNetwork
Currently unsupported.
rootlessctl
Please try this
https://github.com/rootless-containers/usernetes/blob/master/rootlessctl.sh