id = "k3d" name = "k3d" description = "A lightweight wrapper to run k3s clusters in Docker." homepage = "https://k3d.io" executables = ["k3d"] [commands] format = 1 label = "k3d" description = "Create and manage k3s clusters in Docker. Node, registry, image and kubeconfig commands are left out." quality = "ai-draft" base = "fig:k3d" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts" license = "MIT" [[commands.field]] id = "verbose" label = "Verbose output" description = "Verbose output." type = "boolean" option = ["--verbose"] sources = ["src"] [[commands.field]] id = "trace" label = "Trace output" description = "Trace output." type = "boolean" option = ["--trace"] sources = ["src"] [[commands.field]] id = "timestamps" label = "Log timestamps" description = "Print timestamps in log output." type = "boolean" option = ["--timestamps"] sources = ["src"] [[commands.group]] id = "basic" label = "Basic" fields = ["verbose", "trace", "timestamps"] [[commands.subcommand]] path = ["cluster", "create"] label = "Create a cluster" description = "Create a new k3s cluster." [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Cluster name" description = "Name of the cluster to create." type = "string" position = 0 sources = ["src"] [[commands.subcommand.field]] id = "servers" label = "Servers" description = "How many servers to create." type = "integer" option = ["--servers", "-s"] sources = ["src"] [[commands.subcommand.field]] id = "agents" label = "Agents" description = "Number of agents to create." type = "integer" option = ["--agents", "-a"] sources = ["src"] [[commands.subcommand.field]] id = "port" label = "Port mapping" description = "Map ports from node containers to the host (repeatable)." type = "string" option = ["--port", "-p"] multiple = true sources = ["src"] [[commands.subcommand.field]] id = "volume" label = "Volume mount" description = "Mount volumes into the nodes (repeatable)." type = "string" option = ["--volume", "-v"] multiple = true sources = ["src"] [[commands.subcommand.field]] id = "image" label = "k3s image" description = "k3s image for the nodes." type = "string" option = ["--image", "-i"] sources = ["src"] [[commands.subcommand.field]] id = "api_port" label = "API port" description = "Kubernetes API server port exposed on the load balancer." type = "string" option = ["--api-port"] sources = ["src"] [[commands.subcommand.field]] id = "network" label = "Docker network" description = "Docker network to use." type = "string" option = ["--network"] sources = ["src"] [[commands.subcommand.field]] id = "no_lb" label = "No load balancer" description = "Do not create a load balancer." type = "boolean" option = ["--no-lb"] sources = ["src"] [[commands.subcommand.field]] id = "wait" label = "Wait until ready" description = "Wait for the servers to be ready before returning." type = "boolean" option = ["--wait"] sources = ["src"] [[commands.subcommand.field]] id = "timeout" label = "Timeout" description = "Roll back if the cluster is not created within this duration." type = "string" option = ["--timeout"] sources = ["src"] [[commands.subcommand.field]] id = "config" label = "Config file" type = "path" option = ["--config", "-c"] path = { kind = "file", role = "input", must_exist = true } sources = ["src"] [[commands.subcommand.task]] id = "create" label = "Create a cluster" fields = ["name", "servers", "agents", "wait"] required = ["name"] [[commands.subcommand.task]] id = "create_ports" label = "Create with port mapping" fields = ["name", "port", "agents"] required = ["name", "port"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name", "servers", "agents", "port", "volume", "wait"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["image", "api_port", "network", "no_lb", "timeout", "config"] [[commands.subcommand]] path = ["cluster", "list"] label = "List clusters" description = "List clusters." [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts" license = "MIT" [[commands.subcommand.field]] id = "cluster" label = "Cluster" description = "Cluster to list; leave empty for all." type = "string" position = 0 sources = ["src"] [[commands.subcommand.field]] id = "no_headers" label = "No headers" description = "Do not print headers." type = "boolean" option = ["--no-headers"] sources = ["src"] [[commands.subcommand.field]] id = "output" label = "Output format" description = "Output format." type = "string" option = ["--output", "-o"] suggestions = [{ value = "json", label = "json" }, { value = "yaml", label = "yaml" }] sources = ["src"] [[commands.subcommand.task]] id = "list" label = "List clusters" fields = [] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["cluster", "no_headers", "output"] [[commands.subcommand]] path = ["cluster", "start"] label = "Start a cluster" description = "Start a stopped cluster." [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts" license = "MIT" [[commands.subcommand.field]] id = "cluster" label = "Cluster" description = "Cluster to start." type = "string" position = 0 sources = ["src"] [[commands.subcommand.field]] id = "all" label = "All clusters" description = "Start all clusters." type = "boolean" option = ["--all"] sources = ["src"] [[commands.subcommand.field]] id = "wait" label = "Wait until ready" description = "Wait for the servers and load balancer to be ready." type = "boolean" option = ["--wait"] sources = ["src"] [[commands.subcommand.field]] id = "timeout" label = "Timeout" description = "Maximum waiting time for the wait option." type = "string" option = ["--timeout"] sources = ["src"] [[commands.subcommand.task]] id = "start" label = "Start a cluster" fields = ["cluster", "wait"] required = ["cluster"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["cluster", "all", "wait", "timeout"] [[commands.subcommand]] path = ["cluster", "stop"] label = "Stop a cluster" description = "Stop a running cluster." [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts" license = "MIT" [[commands.subcommand.field]] id = "cluster" label = "Cluster" description = "Cluster to stop." type = "string" position = 0 sources = ["src"] [[commands.subcommand.field]] id = "all" label = "All clusters" description = "Stop all clusters." type = "boolean" option = ["--all", "-a"] sources = ["src"] [[commands.subcommand.task]] id = "stop" label = "Stop a cluster" fields = ["cluster"] required = ["cluster"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["cluster", "all"] [[commands.subcommand]] path = ["cluster", "delete"] label = "Delete a cluster" description = "Delete a cluster and its containers." [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/k3d.ts" license = "MIT" [[commands.subcommand.field]] id = "cluster" label = "Cluster" description = "Cluster to delete." type = "string" position = 0 effect = "delete" sources = ["src"] [[commands.subcommand.field]] id = "all" label = "All clusters" description = "Delete all clusters." type = "boolean" option = ["--all", "-a"] effect = "delete" sources = ["src"] [[commands.subcommand.task]] id = "delete" label = "Delete a cluster" fields = ["cluster"] required = ["cluster"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["cluster", "all"]