KRAFT-CLOUD-TUNNEL(1)

πŸ“¦ version 0.12.16, in nixos 26.05, nixpkgs unstable

hiii bestie πŸ’– welcome to the KraftKit CLI manual β€” yes, the KraftKit CLI(1) one β€” and this page is literally the kraft-cloud-tunnel glow-up. it's giving backstage-pass realness, no cap. ✨

🌸 NAME 🌸

kraft-cloud-tunnel β€” forward a local port to an unexposed instance. that's the whole assignment, and she ate. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

kraft cloud tunnel [FLAGS] [LOCAL_PORT:]:DEST_PORT[/TYPE] ...

✨ DESCRIPTION ✨

okay so picture this: you need to reach an instance on Unikraft Cloud that is not publicly exposed to the internet. rude, but valid. you use the kraft cloud tunnel subcommand to forward from a local port to a port that the instance is listening on. it's lowkey magic but highkey just networking. πŸͺ„

the kraft cloud tunnel subcommand creates a secure tunnel between your local machine and the private instance(s). the tunnel gets created through an intermediate TLS tunnel service β€” which is basically another instance running as a sidecar right alongside the target instance in the same private network. that tunnel service listens on a publicly exposed port on the cloud and forwards the traffic to the private instance. sidecar queen behavior, fr fr. πŸ‘‘

when you run the kraft cloud tunnel subcommand, you specify:

  • the local port to forward
  • the private instance to connect to
  • the port on the private instance to connect to

you can also customize the remote port that the tunnel service exposes and the command-and-control port used by the tunnel service. by default, the remote port is 4444 and the command-and-control port is 4443. iconic defaults, no notes. πŸ’–

πŸ’… OPTIONS πŸ’…

  • -h, --help[=false] β€” help for tunnel
  • -P, --tunnel-control-port=4443 β€” Command-and-control port used by the tunneling service(s).
  • --tunnel-image="official/utils/tunnel:1.0" β€” Tunnel service image
  • -p, --tunnel-proxy-port=[] β€” Remote port exposed by the tunnelling service(s). (default start port is 4444)

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

  • --allow-insecure[=false] β€” Allow insecure connections to the Unikraft Cloud API
  • --metro="" β€” Unikraft Cloud metro location
  • --token="" β€” Unikraft Cloud access token

πŸŽ€ EXAMPLES πŸŽ€

here's the examples section, verbatim bestie β€” copy these exactly, don't @ me 🫢

       # Forward to the TCP port of `8080` of the unexposed instance
       # identified by its name "nginx" which then becomes locally accessible
       # also at `8080`:
       $ kraft cloud tunnel nginx:8080

       # Forward to the TCP port of 8080 of the unexposed instance based on its
       # private FQDN `nginx.internal` which then becomes locally
       # accessible also at `8080`:
       $ kraft cloud tunnel nginx.internal:8080

       # Forward to the TCP port of `8080` of the unexposed instance
       # based on its private IP `172.16.28.8` which then becomes locally
       # accessible also at `8080`:
       $ kraft cloud tunnel 172.16.28.8:8080

       # Forward to the UDP port of `8123` of the unexposed instance
       # based on its private IP `172.16.22.2` which then becomes locally
       # accessible also at `8123`:
       $ kraft cloud tunnel 172.16.22.2:8123/udp

       # Forward to the TCP port of `8080` of the unexposed instance by
       # its name "nginx" which then becomes locally accessible at
       # `8333`:
       $ kraft cloud tunnel 8333:nginx:8080

       # Forward multiple ports from multiple instances
       $ kraft cloud tunnel 8080:my-instance1:8080/tcp 8443:my-instance2:8080/tcp

       # In the circumstance where the port you wish to connect to of the
       # instance is the same as the remote port exposed by the tunnelling
       # service (or the the command-and-control port of the tunneling service),
       # you can use the -p and -P flag to set alternative relay and command-
       # and-control ports.
       #
       # Tunnel to the instance 'my-instance' on port 8080 via the intermediate
       # 5500 port
       $ kraft cloud tunnel -p 5500 my-instance:8080

πŸ”₯ SEE ALSO πŸ”₯

kraft-cloud(1) β€” go read that too bestie, it's the parent page. 🫢

πŸ“œ HISTORY πŸ“œ

  • 1-Jan-1980 Auto generated by KraftKit

and that's the page! big kiss to KraftKit Documentation, Jan 1980, and KraftKit CLI(1) β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from