Simple kubernetes operator creating SSH tunnels for services
Because sometimes you need a quick-and-a-little-dirty way to expose your services.
For every service that exists and contains an annotation tunnel-operator.wurbanski.me/open-tunnel: yes, tunnel-operator will create a ssh tunnel from your service, first specified port to your remote host, same port number.
The tunnel is then created as a scale-1 deployment in tunnel namespace.
manifests/ directory of the repo (namespace.yaml, serviceaccount.yaml, rbac.yaml, deployment.yaml)example-config directory and apply it.tunnel-operator.wurbanski.me/open-tunnel: yes annotation to your service that you want to forward.Further tuning through annotations:
tunnel-operator.wurbanski.me/forward-port: "<number>" - use specified port to forward from service. The same port will be chosen on the remote, unless overriden as below.tunnel-operator.wurbanski.me/remote-port: "<number>" - use specified remote port (still prefixed with 127.0.0.1 on remote host)It depends on configuration of your SSH server mostly. I take no responsibilities for any damage that using this operator might cause. Sorry!
Some good resources with configuration guidelines include:
Content type
Image
Digest
Size
348.9 MB
Last updated
over 6 years ago
docker pull wurbanski/tunnel-operator