Skip to content

Connect to tunnels

The tunnel plugin for the inlets-pro CLI can be used to get connection instructions for a tunnel.

Whether the client needs to be deployed as a systemd service on the customers server or as a Kubernetes service, with the CLI it is easy to generate connection instructions for these different formats by setting the --format flag.

Supported formats:

Make sure you have the latest version of the tunnel command available:

inlets-pro plugin get tunnel

Get connection instructions

Generate the client command for the selected tunnel:

$ inlets-pro tunnel connect openfaas \
    --domain \

# Access your HTTP tunnel via: http://openfaas.tunnels:8000

# Access your TCP tunnel via ClusterIP: 
#  openfaas.tunnels:5432

inlets-pro uplink client \
  --url=wss:// \
  --token=tbAd4HooCKLRicfcaB5tZvG3Qj36pjFSL3Qob6b9DBlgtslmildACjWZUD \

Optionally the --quiet flag can be set to print the CLI command without the additional info.

Deploy the client as a systemd service

To generate a systemd service file for the tunnel client command set the --format flag to systemd.

$ inlets-pro tunnel connect openfaas \
    --domain \ 
    --upstream \
    --format systemd

Description=openfaas inlets client

ExecStart=/usr/local/bin/inlets-pro uplink client --url=wss:// --token=tbAd4HooCKLRicfcaB5tZvG3Qj36pjFSL3Qob6b9DBlgtslmildACjWZUD --upstream=


Copy the service file over to the customer's host. Save the unit file as: /etc/systemd/system/openfaas-tunnel.service.

Once the file is in place start the service for the first time:

sudo systemctl daemon-reload
sudo systemctl enable --now openfaas-tunnel

Verify the tunnel client is running:

systemctl status openfaas-tunnel

You can also check the logs to see if the client connected successfully:

journalctl -u openfaas-tunnel

Deploy the client in a Kubernetes cluster

To generate a YAML deployment for a selected tunnel, set the --format flag to k8s_yaml. The generated resource can be deployed in the customers cluster.

inlets-pro tunnel connect openfaas \
    --domain \
    --upstream http://gateway.openfaas:8080 \
    --format k8s_yaml

apiVersion: apps/v1
kind: Deployment
  name: openfaas-inlets-client
  replicas: 1
      app: openfaas-inlets-client
        app: openfaas-inlets-client
      - name: openfaas-inlets-client
        imagePullPolicy: IfNotPresent
        command: ["inlets-pro"]
        - "uplink"
        - "client"
        - "--url=wss://"
        - "--token=tbAd4HooCKLRicfcaB5tZvG3Qj36pjFSL3Qob6b9DBlgtslmildACjWZUD"
        - "--upstream=http://gateway.openfaas:8080"

In this example we create a tunnel to uplink an OpenFaaS deployment.

Get the logs for the client and check it connected successfully:

kubectl logs deploy/openfaas-inlets-client