diff --git a/Makefile b/Makefile index b3859825..56b31744 100644 --- a/Makefile +++ b/Makefile @@ -115,3 +115,6 @@ _lint: # Uncloud daemon won't likely support OS other than Linux anytime soon, so for now we can rely on that. GOOS=linux golangci-lint run $(ARGS) +.PHONY: cli-docs +cli-docs: + go run ./cmd/uncloud docs diff --git a/cmd/uncloud/docs.go b/cmd/uncloud/docs.go new file mode 100644 index 00000000..29c2f184 --- /dev/null +++ b/cmd/uncloud/docs.go @@ -0,0 +1,110 @@ +package main + +import ( + "fmt" + "os" + "path/filepath" + "regexp" + "strings" + + "github.com/spf13/cobra" + "github.com/spf13/cobra/doc" +) + +const docsDir = "website/docs/9-cli-reference" + +type cmdWrapper struct { + cmd *cobra.Command +} + +// NewDocsCommand creates a new hidden command to generate CLI reference docs. +func NewDocsCommand() *cobra.Command { + wrapper := &cmdWrapper{} + cmd := &cobra.Command{ + Use: "docs", + Short: "Generate Uncloud CLI reference docs", + SilenceUsage: true, + DisableFlagsInUseLine: true, + Hidden: true, + Args: cobra.NoArgs, + ValidArgsFunction: cobra.NoFileCompletions, + RunE: func(cmd *cobra.Command, _ []string) error { + // Remove existing markdown files. + mdFiles, err := filepath.Glob(filepath.Join(docsDir, "*.md")) + if err != nil { + return fmt.Errorf("list existing CLI docs: %w", err) + } + for _, f := range mdFiles { + if err = os.Remove(f); err != nil { + return fmt.Errorf("remove '%s': %w", f, err) + } + } + + // Generate new CLI reference docs. + wrapper.cmd.Root().DisableAutoGenTag = true + if err := doc.GenMarkdownTree(cmd.Root(), docsDir); err != nil { + return fmt.Errorf("generate CLI docs: %w", err) + } + + // Remove *completion*.md files that contain malformatted code blocks that break Docusaurus. + mdFiles, err = filepath.Glob(filepath.Join(docsDir, "*completion*.md")) + if err != nil { + return fmt.Errorf("list generated CLI docs: %w", err) + } + for _, f := range mdFiles { + if err = os.Remove(f); err != nil { + return fmt.Errorf("remove '%s': %w", f, err) + } + } + + // Post-process generated markdown files. + mdFiles, err = filepath.Glob(filepath.Join(docsDir, "*.md")) + if err != nil { + return fmt.Errorf("list generated CLI docs: %w", err) + } + + for _, f := range mdFiles { + if err = postProcessMarkdown(f); err != nil { + return fmt.Errorf("post-process '%s': %w", f, err) + } + } + + return nil + }, + } + + wrapper.cmd = cmd + return cmd +} + +// postProcessMarkdown applies transformations to generated markdown files. +func postProcessMarkdown(filename string) error { + data, err := os.ReadFile(filename) + if err != nil { + return err + } + + content := string(data) + + // Replace "SEE ALSO" with "See also". + content = strings.ReplaceAll(content, "SEE ALSO", "See also") + // Escape to avoid Docusaurus treating it as an HTML tag. + content = strings.ReplaceAll(content, "", "\\") + + // Adjust heading levels. Process from shortest to longest to avoid double replacements. + replacements := []struct { + old, new string + }{ + {`(?m)^## `, `# `}, + {`(?m)^### `, `## `}, + {`(?m)^#### `, `### `}, + {`(?m)^##### `, `#### `}, + } + + for _, r := range replacements { + re := regexp.MustCompile(r.old) + content = re.ReplaceAllString(content, r.new) + } + + return os.WriteFile(filename, []byte(content), 0644) +} diff --git a/cmd/uncloud/main.go b/cmd/uncloud/main.go index 68bc9a9d..d1bb64ba 100644 --- a/cmd/uncloud/main.go +++ b/cmd/uncloud/main.go @@ -27,7 +27,7 @@ type globalOptions struct { func main() { opts := globalOptions{} cmd := &cobra.Command{ - Use: "uncloud", + Use: "uc", Short: "A CLI tool for managing Uncloud resources such as clusters, machines, and services.", Version: version.String(), SilenceUsage: true, @@ -75,6 +75,7 @@ func main() { cmd.AddCommand( NewDeployCommand(), + NewDocsCommand(), NewBuildCommand(), caddy.NewRootCommand(), cmdcontext.NewRootCommand(), diff --git a/website/docs/9-cli-reference/_category_.yaml b/website/docs/9-cli-reference/_category_.yaml new file mode 100644 index 00000000..dd3291c5 --- /dev/null +++ b/website/docs/9-cli-reference/_category_.yaml @@ -0,0 +1,4 @@ +label: CLI reference +collapsed: true # keep the category closed by default +link: + type: generated-index diff --git a/website/docs/9-cli-reference/uc.md b/website/docs/9-cli-reference/uc.md new file mode 100644 index 00000000..b8b2104a --- /dev/null +++ b/website/docs/9-cli-reference/uc.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_build.md b/website/docs/9-cli-reference/uc_build.md new file mode 100644 index 00000000..8de94907 --- /dev/null +++ b/website/docs/9-cli-reference/uc_build.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_caddy.md b/website/docs/9-cli-reference/uc_caddy.md new file mode 100644 index 00000000..9b4aac31 --- /dev/null +++ b/website/docs/9-cli-reference/uc_caddy.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_caddy_config.md b/website/docs/9-cli-reference/uc_caddy_config.md new file mode 100644 index 00000000..2497f26b --- /dev/null +++ b/website/docs/9-cli-reference/uc_caddy_config.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_caddy_deploy.md b/website/docs/9-cli-reference/uc_caddy_deploy.md new file mode 100644 index 00000000..37816acb --- /dev/null +++ b/website/docs/9-cli-reference/uc_caddy_deploy.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_ctx.md b/website/docs/9-cli-reference/uc_ctx.md new file mode 100644 index 00000000..0c94e6c6 --- /dev/null +++ b/website/docs/9-cli-reference/uc_ctx.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_ctx_ls.md b/website/docs/9-cli-reference/uc_ctx_ls.md new file mode 100644 index 00000000..30211d33 --- /dev/null +++ b/website/docs/9-cli-reference/uc_ctx_ls.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_ctx_use.md b/website/docs/9-cli-reference/uc_ctx_use.md new file mode 100644 index 00000000..e709fa2a --- /dev/null +++ b/website/docs/9-cli-reference/uc_ctx_use.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_deploy.md b/website/docs/9-cli-reference/uc_deploy.md new file mode 100644 index 00000000..46343860 --- /dev/null +++ b/website/docs/9-cli-reference/uc_deploy.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_dns.md b/website/docs/9-cli-reference/uc_dns.md new file mode 100644 index 00000000..3526bddf --- /dev/null +++ b/website/docs/9-cli-reference/uc_dns.md @@ -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 '\.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. + diff --git a/website/docs/9-cli-reference/uc_dns_release.md b/website/docs/9-cli-reference/uc_dns_release.md new file mode 100644 index 00000000..11b905f7 --- /dev/null +++ b/website/docs/9-cli-reference/uc_dns_release.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_dns_reserve.md b/website/docs/9-cli-reference/uc_dns_reserve.md new file mode 100644 index 00000000..446a5ac0 --- /dev/null +++ b/website/docs/9-cli-reference/uc_dns_reserve.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_dns_show.md b/website/docs/9-cli-reference/uc_dns_show.md new file mode 100644 index 00000000..a64c6c16 --- /dev/null +++ b/website/docs/9-cli-reference/uc_dns_show.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_inspect.md b/website/docs/9-cli-reference/uc_inspect.md new file mode 100644 index 00000000..66c67e22 --- /dev/null +++ b/website/docs/9-cli-reference/uc_inspect.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_ls.md b/website/docs/9-cli-reference/uc_ls.md new file mode 100644 index 00000000..75c5d85e --- /dev/null +++ b/website/docs/9-cli-reference/uc_ls.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_machine.md b/website/docs/9-cli-reference/uc_machine.md new file mode 100644 index 00000000..d7f2c641 --- /dev/null +++ b/website/docs/9-cli-reference/uc_machine.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_machine_add.md b/website/docs/9-cli-reference/uc_machine_add.md new file mode 100644 index 00000000..818a167d --- /dev/null +++ b/website/docs/9-cli-reference/uc_machine_add.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_machine_init.md b/website/docs/9-cli-reference/uc_machine_init.md new file mode 100644 index 00000000..b31c32eb --- /dev/null +++ b/website/docs/9-cli-reference/uc_machine_init.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_machine_ls.md b/website/docs/9-cli-reference/uc_machine_ls.md new file mode 100644 index 00000000..6dc10291 --- /dev/null +++ b/website/docs/9-cli-reference/uc_machine_ls.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_machine_rename.md b/website/docs/9-cli-reference/uc_machine_rename.md new file mode 100644 index 00000000..f7e08953 --- /dev/null +++ b/website/docs/9-cli-reference/uc_machine_rename.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_machine_rm.md b/website/docs/9-cli-reference/uc_machine_rm.md new file mode 100644 index 00000000..c5d3cae6 --- /dev/null +++ b/website/docs/9-cli-reference/uc_machine_rm.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_machine_token.md b/website/docs/9-cli-reference/uc_machine_token.md new file mode 100644 index 00000000..19ada1a7 --- /dev/null +++ b/website/docs/9-cli-reference/uc_machine_token.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_machine_update.md b/website/docs/9-cli-reference/uc_machine_update.md new file mode 100644 index 00000000..1df55b02 --- /dev/null +++ b/website/docs/9-cli-reference/uc_machine_update.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_rm.md b/website/docs/9-cli-reference/uc_rm.md new file mode 100644 index 00000000..75260b38 --- /dev/null +++ b/website/docs/9-cli-reference/uc_rm.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_run.md b/website/docs/9-cli-reference/uc_run.md new file mode 100644 index 00000000..325c85ea --- /dev/null +++ b/website/docs/9-cli-reference/uc_run.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_scale.md b/website/docs/9-cli-reference/uc_scale.md new file mode 100644 index 00000000..9e0c0342 --- /dev/null +++ b/website/docs/9-cli-reference/uc_scale.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_service.md b/website/docs/9-cli-reference/uc_service.md new file mode 100644 index 00000000..d24bc34f --- /dev/null +++ b/website/docs/9-cli-reference/uc_service.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_service_inspect.md b/website/docs/9-cli-reference/uc_service_inspect.md new file mode 100644 index 00000000..32c1f882 --- /dev/null +++ b/website/docs/9-cli-reference/uc_service_inspect.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_service_ls.md b/website/docs/9-cli-reference/uc_service_ls.md new file mode 100644 index 00000000..d46a7a7d --- /dev/null +++ b/website/docs/9-cli-reference/uc_service_ls.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_service_rm.md b/website/docs/9-cli-reference/uc_service_rm.md new file mode 100644 index 00000000..e8e0026c --- /dev/null +++ b/website/docs/9-cli-reference/uc_service_rm.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_service_run.md b/website/docs/9-cli-reference/uc_service_run.md new file mode 100644 index 00000000..0a40d5dd --- /dev/null +++ b/website/docs/9-cli-reference/uc_service_run.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_service_scale.md b/website/docs/9-cli-reference/uc_service_scale.md new file mode 100644 index 00000000..869834f4 --- /dev/null +++ b/website/docs/9-cli-reference/uc_service_scale.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_volume.md b/website/docs/9-cli-reference/uc_volume.md new file mode 100644 index 00000000..b90acd74 --- /dev/null +++ b/website/docs/9-cli-reference/uc_volume.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_volume_create.md b/website/docs/9-cli-reference/uc_volume_create.md new file mode 100644 index 00000000..7e91ec7d --- /dev/null +++ b/website/docs/9-cli-reference/uc_volume_create.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_volume_inspect.md b/website/docs/9-cli-reference/uc_volume_inspect.md new file mode 100644 index 00000000..5785093f --- /dev/null +++ b/website/docs/9-cli-reference/uc_volume_inspect.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_volume_ls.md b/website/docs/9-cli-reference/uc_volume_ls.md new file mode 100644 index 00000000..6ca5b3d6 --- /dev/null +++ b/website/docs/9-cli-reference/uc_volume_ls.md @@ -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. + diff --git a/website/docs/9-cli-reference/uc_volume_rm.md b/website/docs/9-cli-reference/uc_volume_rm.md new file mode 100644 index 00000000..309217c5 --- /dev/null +++ b/website/docs/9-cli-reference/uc_volume_rm.md @@ -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. +