Expose a TCP port, such as SSH
Let clients outside the cluster reach a TCP port of a web application, such as SSH to clone and push to a Git host.
A web application serves HTTPS on its default route and its custom domains. When it also speaks another protocol over TCP, such as SSH for a Git host, expose that port: clients outside the cluster then reach it at the default route and a public port that Tenkai picks.
Expose a port
- Open the web application and choose Change configuration….
- In TCP port, enter the port your containers listen on, such as
22or2222. - Save, then choose Apply configuration or deploy. The port opens with the deployment, as any other setting.
The Configuration tab then shows the address, such as git-k7m4p9.apps.tenkai.cloud:22000. Tenkai picks the public port from 22000 to 22019, the first one no other web application of the cluster holds. A cluster exposes 20 TCP ports at most.
The web application keeps its public port until you delete it, even if you stop exposing a port or change the port of its containers: the address your users saved keeps working.
What to know before you expose a port
- Anyone on the internet can connect to the port. Your application decides who gets in, as an SSH server does with keys. Tenkai does not restrict the source addresses.
- Tenkai passes the bytes as they are and ends no TLS. A protocol that needs encryption must bring its own.
- Your application sees the address of the edge router, not that of the client.
- The port follows the default route: it works while the default route is enabled. It does not answer on a custom domain with an A record to an old edge node, so prefer a CNAME.
- A deployment and a move of the edge node keep the port open. Deleting the web application closes it.
- UDP is not supported.
If the dialog says that The edge router of the cluster is older than the TCP ports, update the edge router first. The update interrupts the public traffic of the cluster for a few seconds, once.
Clone over SSH from a Git host
An app of the marketplace that serves SSH, such as a Git host, exposes its SSH port when you install it, and shows the clone URL with its public port:
git clone ssh://[email protected]:22000/team/repo.git
Add your public key in the settings of your account on the Git host first. To skip the port in each URL, add the host to ~/.ssh/config:
Host git-k7m4p9.apps.tenkai.cloud
Port 22000
User git