Skip to content

Commit 9e0989d

Browse files
committed
Show additional examples
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 2287d9a commit 9e0989d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

blog/_posts/2024-10-17-ssh-with-inlets-cloud.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,25 @@ For instance, if you were running a Node.js application on port 3000 on the remo
141141
ssh -L 3000:127.0.0.1:3000 nuc.example.com
142142
```
143143

144+
If you have a Kubernetes cluster on the remote machine, you can port-forward services from it to your local machine, whilst on a different network. For instance, if the remote cluster is running [OpenFaaS CE](http://openfaas.com), and you wanted to access its Prometheus dashboard, you could do this:
145+
146+
```bash
147+
ssh -L 9090:127.0.0.1:9090 nuc.example.com
148+
# kubectl port-forward -n openfaas svc/prometheus 9090:9090
149+
```
150+
151+
Then open a browser to `http://localhost:9090` to access the Prometheus dashboard.
152+
153+
You can specify multiple hosts and ports, i.e. for both Prometheus and the OpenFaaS gateway:
154+
155+
```bash
156+
ssh -L 9090:127.0.0.1:9090 \
157+
-L 8080:127.0.0.1:8080 \
158+
nuc.example.com
159+
# kubectl port-forward -n openfaas svc/prometheus 9090:9090 &
160+
# kubectl port-forward -n openfaas svc/gateway 8080:8080 &
161+
```
162+
144163
Of course you can also copy files with `scp` or use `rsync` over the SSH connection.
145164

146165
Copy a single remote file to your host:

0 commit comments

Comments
 (0)