feat: add 'uc proxy' command to proxy a service port to a local port (#384)

Signed-off-by: Miek Gieben <miek@miek.nl>
Co-authored-by: Pasha Sviderski <me@psviderski.name>
This commit is contained in:
Miek Gieben
2026-06-02 18:56:16 +10:00
committed by GitHub
co-authored by Pasha Sviderski
parent 24b81af43c
commit 3586a32987
6 changed files with 220 additions and 1 deletions
+1
View File
@@ -26,6 +26,7 @@ A CLI tool for managing Uncloud resources such as machines, services, and volume
* [uc logs](uc_logs.md) - View service logs.
* [uc ls](uc_ls.md) - List services.
* [uc machine](uc_machine.md) - Manage machines in the cluster.
* [uc proxy](uc_proxy.md) - Proxy a service port to a local port.
* [uc ps](uc_ps.md) - List all service containers.
* [uc rm](uc_rm.md) - Remove one or more services.
* [uc run](uc_run.md) - Run a service.
+36
View File
@@ -0,0 +1,36 @@
# uc proxy
Proxy a service port to a local port.
## Synopsis
Proxy a service port in the cluster to a local port on this machine.
If the service runs multiple containers, the command connects to the first running and healthy one.
If you don't provide a local port, the command picks a random one.
The connection stays open for as long as the command runs.
```
uc proxy SERVICE [LOCAL_PORT:]REMOTE_PORT [flags]
```
## Options
```
-h, --help help for proxy
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file. [$UNCLOUD_CONNECT]
Format: [ssh://]user@host[:port], ssh+go://user@host[:port], tcp://host:port, or unix:///path/to/uncloud.sock
-c, --context string Name of the cluster context to use (default is the current context). [$UNCLOUD_CONTEXT]
--uncloud-config string Path to the Uncloud configuration file. [$UNCLOUD_CONFIG] (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as machines, services, and volumes.