docs: 'uc docs' command to generate CLI reference docs

This commit is contained in:
Pasha Sviderski
2025-08-28 20:09:18 +10:00
parent 290e6db98e
commit 7c19323ea1
41 changed files with 1265 additions and 1 deletions
@@ -0,0 +1,4 @@
label: CLI reference
collapsed: true # keep the category closed by default
link:
type: generated-index
+30
View File
@@ -0,0 +1,30 @@
# uc
A CLI tool for managing Uncloud resources such as clusters, machines, and services.
## Options
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
-h, --help help for uc
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc build](uc_build.md) - Build services from a Compose file.
* [uc caddy](uc_caddy.md) - Manage Caddy reverse proxy service.
* [uc completion](uc_completion.md) - Generate the autocompletion script for the specified shell
* [uc ctx](uc_ctx.md) - Switch between different cluster contexts. Contains subcommands to manage contexts.
* [uc deploy](uc_deploy.md) - Deploy services from a Compose file.
* [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS.
* [uc inspect](uc_inspect.md) - Display detailed information on a service.
* [uc ls](uc_ls.md) - List services.
* [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster.
* [uc rm](uc_rm.md) - Remove one or more services.
* [uc run](uc_run.md) - Run a service.
* [uc scale](uc_scale.md) - Scale a replicated service by changing the number of replicas.
* [uc service](uc_service.md) - Manage services in an Uncloud cluster.
* [uc volume](uc_volume.md) - Manage volumes in an Uncloud cluster.
+30
View File
@@ -0,0 +1,30 @@
# uc build
Build services from a Compose file.
```
uc build [FLAGS] [SERVICE...] [flags]
```
## Options
```
-f, --file strings One or more Compose files to build (default compose.yaml)
-h, --help help for build
-n, --no-cache Do not use cache when building images. (default false)
-p, --profile strings One or more Compose profiles to enable.
-P, --push Push built images to the registry after building. (default false)
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
+24
View File
@@ -0,0 +1,24 @@
# uc caddy
Manage Caddy reverse proxy service.
## Options
```
-h, --help help for caddy
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
* [uc caddy config](uc_caddy_config.md) - Show the current Caddy configuration (Caddyfile).
* [uc caddy deploy](uc_caddy_deploy.md) - Deploy or upgrade Caddy reverse proxy across all machines in the cluster.
@@ -0,0 +1,33 @@
# uc caddy config
Show the current Caddy configuration (Caddyfile).
## Synopsis
Display the current Caddy configuration (Caddyfile) from the connected machine or a specified one.
```
uc caddy config [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for config
-m, --machine string Name or ID of the machine to get the configuration from. (default is connected machine)
--no-color Disable syntax highlighting for the output.
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc caddy](uc_caddy.md) - Manage Caddy reverse proxy service.
@@ -0,0 +1,35 @@
# uc caddy deploy
Deploy or upgrade Caddy reverse proxy across all machines in the cluster.
## Synopsis
Deploy or upgrade Caddy reverse proxy across all machines in the cluster.
A rolling update is performed when updating existing containers to minimise disruption.
```
uc caddy deploy [flags]
```
## Options
```
--caddyfile string Path to a custom global Caddy config (Caddyfile) that will be prepended to the auto-generated Caddy config.
-c, --context string Name of the cluster context to deploy to. (default is the current context)
-h, --help help for deploy
--image string Caddy Docker image to deploy. (default caddy:LATEST_VERSION)
-m, --machine strings Machine names to deploy to. Can be specified multiple times or as a comma-separated list of machine names. (default is all machines)
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc caddy](uc_caddy.md) - Manage Caddy reverse proxy service.
+28
View File
@@ -0,0 +1,28 @@
# uc ctx
Switch between different cluster contexts. Contains subcommands to manage contexts.
```
uc ctx [flags]
```
## Options
```
-h, --help help for ctx
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
* [uc ctx ls](uc_ctx_ls.md) - List available cluster contexts.
* [uc ctx use](uc_ctx_use.md) - Switch to a different cluster context.
+27
View File
@@ -0,0 +1,27 @@
# uc ctx ls
List available cluster contexts.
```
uc ctx ls [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for ls
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc ctx](uc_ctx.md) - Switch between different cluster contexts. Contains subcommands to manage contexts.
@@ -0,0 +1,30 @@
# uc ctx use
Switch to a different cluster context.
## Synopsis
Switch to a different cluster context. If no context is provided, a list of available contexts will be displayed for selection.
```
uc ctx use [CONTEXT] [flags]
```
## Options
```
-h, --help help for use
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc ctx](uc_ctx.md) - Switch between different cluster contexts. Contains subcommands to manage contexts.
+31
View File
@@ -0,0 +1,31 @@
# uc deploy
Deploy services from a Compose file.
```
uc deploy [FLAGS] [SERVICE...] [flags]
```
## Options
```
-c, --context string Name of the cluster context to deploy to (default is the current context)
-f, --file strings One or more Compose files to deploy services from. (default compose.yaml)
-h, --help help for deploy
-n, --no-build Do not build images before deploying services. (default false)
-p, --profile strings One or more Compose profiles to enable.
--recreate Recreate containers even if their configuration and image haven't changed.
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
+30
View File
@@ -0,0 +1,30 @@
# uc dns
Manage cluster domain in Uncloud DNS.
## Synopsis
Manage cluster domain in Uncloud DNS.
DNS commands allow you to reserve or release a unique '\<id>.cluster.uncloud.run' domain for your cluster. When reserved, Caddy service deployments will automatically update DNS records to route traffic to the services in the cluster.
## Options
```
-h, --help help for dns
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
* [uc dns release](uc_dns_release.md) - Release the reserved cluster domain.
* [uc dns reserve](uc_dns_reserve.md) - Reserve a cluster domain in Uncloud DNS.
* [uc dns show](uc_dns_show.md) - Print the cluster domain name.
@@ -0,0 +1,27 @@
# uc dns release
Release the reserved cluster domain.
```
uc dns release [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for release
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS.
@@ -0,0 +1,28 @@
# uc dns reserve
Reserve a cluster domain in Uncloud DNS.
```
uc dns reserve [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
--endpoint string API endpoint for the Uncloud DNS service. (default "https://dns.uncloud.run/v1")
-h, --help help for reserve
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS.
@@ -0,0 +1,27 @@
# uc dns show
Print the cluster domain name.
```
uc dns show [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for show
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS.
@@ -0,0 +1,27 @@
# uc inspect
Display detailed information on a service.
```
uc inspect SERVICE [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for inspect
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
+27
View File
@@ -0,0 +1,27 @@
# uc ls
List services.
```
uc ls [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for ls
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
@@ -0,0 +1,29 @@
# uc machine
Manage machines in an Uncloud cluster.
## Options
```
-h, --help help for machine
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
* [uc machine add](uc_machine_add.md) - Add a remote machine to a cluster.
* [uc machine init](uc_machine_init.md) - Initialise a new cluster with a remote machine as the first member.
* [uc machine ls](uc_machine_ls.md) - List machines in a cluster.
* [uc machine rename](uc_machine_rename.md) - Rename a machine in the cluster.
* [uc machine rm](uc_machine_rm.md) - Remove a machine from a cluster and reset it.
* [uc machine token](uc_machine_token.md) - Print the local machine's token for adding it to a cluster.
* [uc machine update](uc_machine_update.md) - Update machine configuration in the cluster.
@@ -0,0 +1,32 @@
# uc machine add
Add a remote machine to a cluster.
```
uc machine add [USER@]HOST[:PORT] [flags]
```
## Options
```
-c, --context string Name of the cluster context to add the machine to. (default is the current context)
-h, --help help for add
-n, --name string Assign a name to the machine.
--no-caddy Don't deploy Caddy reverse proxy service to the machine.
--public-ip string Public IP address of the machine for ingress configuration. Use 'auto' for automatic detection, blank '' or 'none' to disable ingress on this machine, or specify an IP address. (default "auto")
-i, --ssh-key string Path to SSH private key for remote login (if not already added to SSH agent). (default "~/.ssh/id_ed25519")
--version string Version of the Uncloud daemon to install on the machine. (default "latest")
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster.
@@ -0,0 +1,35 @@
# uc machine init
Initialise a new cluster with a remote machine as the first member.
```
uc machine init [USER@HOST:PORT] [flags]
```
## Options
```
-c, --context string Name of the created context for the initialised cluster in the Uncloud config. (default "default")
--dns-endpoint string API endpoint for the Uncloud DNS service. (default "https://dns.uncloud.run/v1")
-h, --help help for init
-n, --name string Assign a name to the machine.
--network string IPv4 network CIDR to use for machines and services. (default "10.210.0.0/16")
--no-caddy Don't deploy Caddy reverse proxy service to the machine.
--no-dns Don't reserve a cluster domain in Uncloud DNS.
--public-ip string Public IP address of the machine for ingress configuration. Use 'auto' for automatic detection, blank '' or 'none' to disable ingress on this machine, or specify an IP address. (default "auto")
-i, --ssh-key string Path to SSH private key for remote login (if not already added to SSH agent). (default "~/.ssh/id_ed25519")
--version string Version of the Uncloud daemon to install on the machine. (default "latest")
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster.
@@ -0,0 +1,27 @@
# uc machine ls
List machines in a cluster.
```
uc machine ls [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for ls
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster.
@@ -0,0 +1,34 @@
# uc machine rename
Rename a machine in the cluster.
## Synopsis
Rename a machine in the cluster.
This command changes the name of an existing machine while preserving all other
configuration including network settings, public IP, and cluster membership.
```
uc machine rename OLD_NAME NEW_NAME [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for rename
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster.
@@ -0,0 +1,29 @@
# uc machine rm
Remove a machine from a cluster and reset it.
```
uc machine rm MACHINE [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for rm
--no-reset Do not reset the machine after removing it from the cluster. This will leave all containers and data intact.
-y, --yes Do not prompt for confirmation before removing the machine.
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster.
@@ -0,0 +1,27 @@
# uc machine token
Print the local machine's token for adding it to a cluster.
```
uc machine token [flags]
```
## Options
```
-d, --data-dir string Directory for storing persistent machine state. (default "/var/lib/uncloud")
-h, --help help for token
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster.
@@ -0,0 +1,39 @@
# uc machine update
Update machine configuration in the cluster.
## Synopsis
Update machine configuration in the cluster.
This command allows setting various machine properties including:
- Machine name (--name)
- Public IP address (--public-ip)
At least one flag must be specified to perform an update operation.
```
uc machine update [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for update
--name string New name for the machine
--public-ip string Public IP address of the machine for ingress configuration. Use 'none' or '' to remove the public IP.
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster.
+27
View File
@@ -0,0 +1,27 @@
# uc rm
Remove one or more services.
```
uc rm SERVICE [SERVICE...] [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for rm
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
+57
View File
@@ -0,0 +1,57 @@
# uc run
Run a service.
```
uc run IMAGE [COMMAND...] [flags]
```
## Options
```
--caddyfile string Path to a custom Caddy config (Caddyfile) for the service. Cannot be used together with non-@host published ports.
-c, --context string Name of the cluster context to run the service in. (default is the current context)
--cpu decimal Maximum number of CPU cores a service container can use. Fractional values are allowed: 0.5 for half a core or 2.25 for two and a quarter cores.
--entrypoint string Overwrite the default ENTRYPOINT of the image. Pass an empty string "" to reset it.
-e, --env strings Set an environment variable for service containers. Can be specified multiple times.
Format: VAR=value or just VAR to use the value from the local environment.
-h, --help help for run
-m, --machine strings Placement constraint by machine names, limiting which machines the service can run on. Can be specified multiple times or as a comma-separated list of machine names. (default is any suitable machine)
--memory bytes Maximum amount of memory a service container can use. Value is a positive integer with optional unit suffix (b, k, m, g). Default unit is bytes if no suffix specified.
Examples: 1073741824, 1024m, 1g (all equal 1 gibibyte)
--mode string Replication mode of the service: either 'replicated' (a specified number of containers across the machines) or 'global' (one container on every machine). (default "replicated")
-n, --name string Assign a name to the service. A random name is generated if not specified.
--privileged Give extended privileges to service containers. This is a security risk and should be used with caution.
-p, --publish strings Publish a service port to make it accessible outside the cluster. Can be specified multiple times.
Format: [hostname:]container_port[/protocol] or [host_ip:]host_port:container_port[/protocol]@host
Supported protocols: tcp, udp, http, https (default is tcp). If a hostname for http(s) port is not specified
and a cluster domain is reserved, service-name.cluster-domain will be used as the hostname.
Examples:
-p 8080/https Publish port 8080 as HTTPS via reverse proxy with default service-name.cluster-domain hostname
-p app.example.com:8080/https Publish port 8080 as HTTPS via reverse proxy with custom hostname
-p 53:5353/udp@host Bind UDP port 5353 to host port 53
--pull string Pull image from the registry before running service containers ('always', 'missing', 'never'). (default "missing")
--replicas uint Number of containers to run for the service. Only valid for a replicated service. (default 1)
-u, --user string User name or UID and optionally group name or GID used for running the command inside service containers.
Format: USER[:GROUP] or UID[:GID]. If not specified, the user is set to the default user of the image.
-v, --volume strings Mount a data volume or host path into service containers. Service containers will be scheduled on the machine(s) where
the volume is located. Can be specified multiple times.
Format: volume_name:/container/path[:ro|volume-nocopy] or /host/path:/container/path[:ro]
Examples:
-v postgres-data:/var/lib/postgresql/data Mount volume 'postgres-data' to /var/lib/postgresql/data in container
-v /data/uploads:/app/uploads Bind mount /data/uploads host directory to /app/uploads in container
-v /host/path:/container/path:ro Bind mount a host directory or file as read-only
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
+31
View File
@@ -0,0 +1,31 @@
# uc scale
Scale a replicated service by changing the number of replicas.
## Synopsis
Scale a replicated service by changing the number of replicas. Scaling down requires confirmation.
```
uc scale SERVICE REPLICAS [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for scale
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
@@ -0,0 +1,27 @@
# uc service
Manage services in an Uncloud cluster.
## Options
```
-h, --help help for service
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
* [uc service inspect](uc_service_inspect.md) - Display detailed information on a service.
* [uc service ls](uc_service_ls.md) - List services.
* [uc service rm](uc_service_rm.md) - Remove one or more services.
* [uc service run](uc_service_run.md) - Run a service.
* [uc service scale](uc_service_scale.md) - Scale a replicated service by changing the number of replicas.
@@ -0,0 +1,27 @@
# uc service inspect
Display detailed information on a service.
```
uc service inspect SERVICE [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for inspect
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc service](uc_service.md) - Manage services in an Uncloud cluster.
@@ -0,0 +1,27 @@
# uc service ls
List services.
```
uc service ls [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for ls
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc service](uc_service.md) - Manage services in an Uncloud cluster.
@@ -0,0 +1,27 @@
# uc service rm
Remove one or more services.
```
uc service rm SERVICE [SERVICE...] [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for rm
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc service](uc_service.md) - Manage services in an Uncloud cluster.
@@ -0,0 +1,57 @@
# uc service run
Run a service.
```
uc service run IMAGE [COMMAND...] [flags]
```
## Options
```
--caddyfile string Path to a custom Caddy config (Caddyfile) for the service. Cannot be used together with non-@host published ports.
-c, --context string Name of the cluster context to run the service in. (default is the current context)
--cpu decimal Maximum number of CPU cores a service container can use. Fractional values are allowed: 0.5 for half a core or 2.25 for two and a quarter cores.
--entrypoint string Overwrite the default ENTRYPOINT of the image. Pass an empty string "" to reset it.
-e, --env strings Set an environment variable for service containers. Can be specified multiple times.
Format: VAR=value or just VAR to use the value from the local environment.
-h, --help help for run
-m, --machine strings Placement constraint by machine names, limiting which machines the service can run on. Can be specified multiple times or as a comma-separated list of machine names. (default is any suitable machine)
--memory bytes Maximum amount of memory a service container can use. Value is a positive integer with optional unit suffix (b, k, m, g). Default unit is bytes if no suffix specified.
Examples: 1073741824, 1024m, 1g (all equal 1 gibibyte)
--mode string Replication mode of the service: either 'replicated' (a specified number of containers across the machines) or 'global' (one container on every machine). (default "replicated")
-n, --name string Assign a name to the service. A random name is generated if not specified.
--privileged Give extended privileges to service containers. This is a security risk and should be used with caution.
-p, --publish strings Publish a service port to make it accessible outside the cluster. Can be specified multiple times.
Format: [hostname:]container_port[/protocol] or [host_ip:]host_port:container_port[/protocol]@host
Supported protocols: tcp, udp, http, https (default is tcp). If a hostname for http(s) port is not specified
and a cluster domain is reserved, service-name.cluster-domain will be used as the hostname.
Examples:
-p 8080/https Publish port 8080 as HTTPS via reverse proxy with default service-name.cluster-domain hostname
-p app.example.com:8080/https Publish port 8080 as HTTPS via reverse proxy with custom hostname
-p 53:5353/udp@host Bind UDP port 5353 to host port 53
--pull string Pull image from the registry before running service containers ('always', 'missing', 'never'). (default "missing")
--replicas uint Number of containers to run for the service. Only valid for a replicated service. (default 1)
-u, --user string User name or UID and optionally group name or GID used for running the command inside service containers.
Format: USER[:GROUP] or UID[:GID]. If not specified, the user is set to the default user of the image.
-v, --volume strings Mount a data volume or host path into service containers. Service containers will be scheduled on the machine(s) where
the volume is located. Can be specified multiple times.
Format: volume_name:/container/path[:ro|volume-nocopy] or /host/path:/container/path[:ro]
Examples:
-v postgres-data:/var/lib/postgresql/data Mount volume 'postgres-data' to /var/lib/postgresql/data in container
-v /data/uploads:/app/uploads Bind mount /data/uploads host directory to /app/uploads in container
-v /host/path:/container/path:ro Bind mount a host directory or file as read-only
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc service](uc_service.md) - Manage services in an Uncloud cluster.
@@ -0,0 +1,31 @@
# uc service scale
Scale a replicated service by changing the number of replicas.
## Synopsis
Scale a replicated service by changing the number of replicas. Scaling down requires confirmation.
```
uc service scale SERVICE REPLICAS [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for scale
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc service](uc_service.md) - Manage services in an Uncloud cluster.
+26
View File
@@ -0,0 +1,26 @@
# uc volume
Manage volumes in an Uncloud cluster.
## Options
```
-h, --help help for volume
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc](uc.md) - A CLI tool for managing Uncloud resources such as clusters, machines, and services.
* [uc volume create](uc_volume_create.md) - Create a volume on a specific machine.
* [uc volume inspect](uc_volume_inspect.md) - Display detailed information on a volume.
* [uc volume ls](uc_volume_ls.md) - List volumes across all machines in the cluster.
* [uc volume rm](uc_volume_rm.md) - Remove one or more volumes.
@@ -0,0 +1,31 @@
# uc volume create
Create a volume on a specific machine.
```
uc volume create VOLUME_NAME [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-d, --driver string Volume driver to use. (default "local")
-h, --help help for create
-l, --label strings Labels to assign to the volume in the form of 'key=value' pairs. Can be specified multiple times.
-m, --machine string Name or ID of the machine to create the volume on.
-o, --opt strings Driver specific options in the form of 'key=value' pairs. Can be specified multiple times.
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc volume](uc_volume.md) - Manage volumes in an Uncloud cluster.
@@ -0,0 +1,28 @@
# uc volume inspect
Display detailed information on a volume.
```
uc volume inspect VOLUME_NAME [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for inspect
-m, --machine string Name or ID of the machine where the volume is located. If not specified, the volume will be searched across all machines.
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc volume](uc_volume.md) - Manage volumes in an Uncloud cluster.
@@ -0,0 +1,29 @@
# uc volume ls
List volumes across all machines in the cluster.
```
uc volume ls [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-h, --help help for ls
-m, --machine strings Filter volumes by machine name or ID. Can be specified multiple times or as a comma-separated list. (default is include all machines)
-q, --quiet Only display volume names.
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc volume](uc_volume.md) - Manage volumes in an Uncloud cluster.
@@ -0,0 +1,35 @@
# uc volume rm
Remove one or more volumes.
## Synopsis
Remove one or more volumes. You cannot remove a volume that is in use by a container.
```
uc volume rm VOLUME_NAME [VOLUME_NAME...] [flags]
```
## Options
```
-c, --context string Name of the cluster context. (default is the current context)
-f, --force Force the removal of one or more volumes.
-h, --help help for rm
-m, --machine strings Name or ID of the machine to remove one or more volumes from. Can be specified multiple times or as a comma-separated list.
If not specified, the found volume(s) will be removed from all machines.
-y, --yes Do not prompt for confirmation before removing the volume(s).
```
## Options inherited from parent commands
```
--connect string Connect to a remote cluster machine without using the Uncloud configuration file.
Format: [ssh://]user@host[:port] or tcp://host:port
--uncloud-config string Path to the Uncloud configuration file. (default "~/.config/uncloud/config.yaml")
```
## See also
* [uc volume](uc_volume.md) - Manage volumes in an Uncloud cluster.