{"owner":"k3d-io","repo":"k3d","hasSkills":true,"totalSkillsCount":31,"totalTokensCount":9993,"categories":["claude-rule","command-prompt"],"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md","docs/usage/commands/k3d.md","docs/usage/commands/k3d_cluster.md","docs/usage/commands/k3d_cluster_create.md","docs/usage/commands/k3d_cluster_delete.md","docs/usage/commands/k3d_cluster_edit.md","docs/usage/commands/k3d_cluster_list.md","docs/usage/commands/k3d_cluster_start.md","docs/usage/commands/k3d_cluster_stop.md","docs/usage/commands/k3d_completion.md","docs/usage/commands/k3d_config.md","docs/usage/commands/k3d_config_init.md","docs/usage/commands/k3d_config_migrate.md","docs/usage/commands/k3d_image.md","docs/usage/commands/k3d_image_import.md","docs/usage/commands/k3d_kubeconfig.md","docs/usage/commands/k3d_kubeconfig_get.md","docs/usage/commands/k3d_kubeconfig_merge.md","docs/usage/commands/k3d_node.md","docs/usage/commands/k3d_node_create.md","docs/usage/commands/k3d_node_delete.md","docs/usage/commands/k3d_node_edit.md","docs/usage/commands/k3d_node_list.md","docs/usage/commands/k3d_node_start.md","docs/usage/commands/k3d_node_stop.md","docs/usage/commands/k3d_registry.md","docs/usage/commands/k3d_registry_create.md","docs/usage/commands/k3d_registry_delete.md","docs/usage/commands/k3d_registry_list.md","docs/usage/commands/k3d_version.md","docs/usage/commands/k3d_version_list.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nk3d creates containerized k3s (lightweight Kubernetes) clusters using Docker. It runs multi-node k3s clusters on a single machine. The Go module is `github.com/k3d-io/k3d/v5`.\n\n## Build & Development Commands\n\n```bash\nmake build              # Build for local platform -> bin/k3d\nmake build-debug        # Build with debug symbols\nmake build-cross        # Cross-compile for all platforms (needs gox)\nmake install-tools      # Install required tools (golangci-lint, gox)\n```\n\nDependencies are vendored (`-mod=vendor`). The go.work workspace includes `.`, `./docgen`, and `./tools`.\n\n### Local Helper Image Overrides\n\nWhen developing helper images locally, use these env vars to point k3d at your local builds instead of the published ones (see `pkg/types/env.go`):\n\n```bash\nK3D_IMAGE_LOADBALANCER=ghcr.io/k3d-io/k3d-proxy:dev   # Override the load balancer (proxy) image\nK3D_IMAGE_TOOLS=ghcr.io/k3d-io/k3d-tools:dev           # Override the tools helper image\n```\n\n## Testing\n\n```bash\nmake test                                           # Run all unit tests\ngo test ./pkg/config/... -run TestProcessConfig     # Run a specific test\nmake e2e                                            # Run E2E tests (requires Docker, uses DIND)\nmake e2e -e E2E_INCLUDE=\"test_basic\"                # Run specific E2E test\nmake e2e -e E2E_LOG_LEVEL=trace -e E2E_FAIL_FAST=true  # E2E with debug output\n```\n\nE2E tests are bash scripts in `tests/` that run inside Docker-in-Docker containers. Unit tests use `testify` for assertions and `go-test/deep` for deep equality. Config test assets are in `pkg/config/test_assets/`.\n\n### E2E Test Framework\n\n**Execution chain:** `make e2e` -> `tests/dind.sh` (builds DIND image, starts privileged container) -> `tests/runner.sh` (discovers and batches tests) -> `test_*.sh` scripts.\n\n**Writing a new E2E test:**\n\n1. Create `tests/test_<name>.sh` (the `test_` prefix is required for auto-discovery)\n2. Make it executable (`chmod +x`)\n3. Follow the standard boilerplate:\n   ```bash\n   #!/bin/bash\n   CURR_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n   [ -d \"$CURR_DIR\" ] || { echo \"FATAL: no current dir (maybe running in zsh?)\"; exit 1; }\n   source \"$CURR_DIR/common.sh\"\n\n   ### Step Setup ###\n   LOG_FILE=\"$TEST_OUTPUT_DIR/$( basename \"${BASH_SOURCE[0]}\" ).log\"\n   exec >${LOG_FILE} 2>&1\n   export LOG_FILE\n   KUBECONFIG=\"$KUBECONFIG_ROOT/$( basename \"${BASH_SOURCE[0]}\" ).yaml\"\n   export KUBECONFIG\n   ### Step Setup ###\n\n   export CURRENT_STAGE=\"Test | <name>\"\n   # ... test logic using $EXE, info, failed, check_clusters, etc.\n   exit 0\n   ```\n4. Use unique cluster/resource names to avoid collisions with parallel tests\n5. Always clean up resources (cluster delete, registry delete) at the end\n\n**Key helpers from `tests/common.sh`:** `info`, `failed`, `passed`, `highlight`, `check_clusters`, `check_multi_node`, `check_registry`, `wait_for_pod_running_by_name`, `wait_for_pod_running_by_label`, `exec_in_node`, `docker_assert_container_label`, `k3s_assert_node_label`.\n\n**E2E environment variables:** `E2E_INCLUDE` (run only named tests), `E2E_EXCLUDE` (skip named tests), `E2E_PARALLEL` (default: 4), `E2E_EXTRA` (run `extra_test_*` files), `E2E_FAIL_FAST`, `E2E_LOG_LEVEL`, `E2E_K3S_VERSION`, `E2E_DIND_VERSION`, `E2E_KEEP` (keep runner container).\n\n## Linting & Formatting\n\n```bash\nmake fmt        # Fix formatting (gofmt)\nmake check-fmt  # Check formatting\nmake lint       # Run golangci-lint (v2.4.0)\nmake ci-lint    # Same with 5-minute timeout (CI)\nmake check      # check-fmt + lint\n```\n\n## Architecture\n\nThree-layer design:\n\n1. **CLI layer** (`cmd/`) - Cobra commands for cluster, node, registry, kubeconfig, image, config, debug subcommands. Entry point: `cmd/root.go` -> `NewCmdK3d()`.\n\n2. **Client layer** (`pkg/client/`) - Business logic and orchestration. Key files: `cluster.go` (ClusterCreate/Start/Delete/Run), `node.go` (NodeCreate/Start/Delete), `registry.go`, `loadbalancer.go`, `kubeconfig.go`.\n\n3. **Runtime layer** (`pkg/runtimes/`) - Container runtime abstraction via the `Runtime` interface in `runtime.go`. Only Docker is implemented (`pkg/runtimes/docker/`). The Docker runtime translates k3d types to Docker API calls (`translate.go`).\n\n### Key Packages\n\n- **`pkg/types/`** - Core domain types: `Cluster`, `Node`, `Registry`, `Role` (ServerRole, AgentRole, LoadBalancerRole, RegistryRole). Extensive label system (`k3d.cluster`, `k3d.role`, etc.) used to track Docker container metadata.\n- **`pkg/config/`** - Versioned config system (current: `v1alpha5`, API version `k3d.io/v1alpha5`). Includes migration (`migrate.go`), JSON schema validation (`schema.json` embedded via `//go:embed`), and config processing/transformation pipeline.\n- **`pkg/actions/`** - Node lifecycle hooks (e.g., `WriteFileAction`).\n- **`pkg/logger/`** - Logging via logrus.\n\n### Helper Components\n\n- **`proxy/`** - nginx-based load balancer with confd for dynamic upstream config. Built as `ghcr.io/k3d-io/k3d-proxy`.\n- **`tools/`** - Separate Go module (`tools/`) for the k3d-tools helper binary. Built as `ghcr.io/k3d-io/k3d-tools`.\n\n## Config System\n\nConfig files are YAML with `apiVersion: k3d.io/v1alpha5` and `kind: Simple`. The processing pipeline: read YAML -> validate JSON schema -> migrate from older versions if needed -> transform to internal types -> merge with defaults. Config versions: v1alpha2 (legacy) -> v1alpha3 -> v1alpha4 -> v1alpha5 (current).\n\n## Version & LDFLAGS\n\nVersion info is injected at build time via LDFLAGS into `version/version.go`:\n- `version.Version` - git tag\n- `version.K3sVersion` - latest stable k3s version (fetched from k3s update channel)\n- `version.HelperVersionOverride` - optional override for helper image versions\n\n## License & Contributing\n\nThis project is **MIT licensed** (Copyright 2019-2023 Thorsten Klein). All new Go source files must include the MIT copyright header present in existing files. See `CONTRIBUTING.md` for guidelines — check existing issues/PRs before opening new ones to avoid duplicates. The project follows the Contributor Covenant Code of Conduct (`CODE_OF_CONDUCT.md`).\n\n## Conventions\n\n- All Go source files have the MIT license copyright header\n- Import alias: `k3d \"github.com/k3d-io/k3d/v5/pkg/types\"` is used throughout as the canonical import for the types package\n- Docker is the only runtime, but all container operations go through the `Runtime` interface\n- Node types are identified by `Role` and tracked via Docker container labels\n\n## Issue & PR Handling\n\n**Before starting work on any issue:**\n\n1. **Check for duplicates** — search open and closed issues for the same topic (`gh issue list -S \"keyword\"` / `gh issue list -S \"keyword\" --state closed`)\n2. **Check for existing PRs** — look for open PRs that already address the issue (`gh pr list -S \"keyword\"`)\n3. **Check if it's a k3d issue** — many reports are actually k3s, Docker, or CNI issues. If so, redirect the reporter to the appropriate upstream repo\n4. **Read the full thread** — issues often evolve through discussion; the original request may have been refined or scoped down\n\n**When replying to issues:**\n\n- For questions: answer concisely, point to env vars/flags/docs, close if resolved\n- For bugs: confirm reproducibility scope, check if already fixed on `main`\n- For features: check if there's a workaround, note if a PR would be welcome\n\n**When working on PRs:**\n\n1. **Check the linked issue** — understand the full context and any decisions made in discussion\n2. **Check the PR's CI status** — don't start reviewing or building on a PR that's failing CI for unrelated reasons\n3. **Check for related/conflicting PRs** — look for other open PRs touching the same files (`gh pr list` + review changed files)\n4. **Verify the branch is up to date** with `main` before investing effort\n\n**Scope awareness:**\n\n- k3d only controls the container orchestration layer around k3s. Issues about k3s behavior, CNI plugins, Kubernetes internals, or Docker engine bugs are upstream concerns\n- The proxy (`k3d-proxy`) and tools (`k3d-tools`) images are part of this project — issues about those are in scope\n- Registry issues may involve the upstream `registry` image vs k3d's registry wiring — distinguish which layer is at fault\n\n## Deep Dive References\n\nFor detailed analysis beyond this summary, see `.planning/codebase/`:\n\n| Document | Contents |\n|----------|----------|\n| `STACK.md` | Full dependency inventory, Go version, build toolchain, Docker SDK usage |\n| `ARCHITECTURE.md` | Layer diagrams, data flow through CLI->Client->Runtime, abstraction boundaries |\n| `STRUCTURE.md` | Complete directory layout, file naming conventions, package organization |\n| `CONVENTIONS.md` | Error handling patterns, logging conventions, code style, naming rules |\n| `TESTING.md` | Unit test patterns, E2E test framework details, test helpers, fixture locations |\n| `INTEGRATIONS.md` | Docker API interaction, k3s channel server, registry (wharfie), kubeconfig handling |\n| `CONCERNS.md` | Technical debt, single-runtime limitation, config migration complexity, known fragile areas |\n","docs/usage/commands/k3d.md":"## k3d\n\nhttps://k3d.io/ -> Run k3s in Docker!\n\n### Synopsis\n\nhttps://k3d.io/\nk3d is a wrapper CLI that helps you to easily create k3s clusters inside docker.\nNodes of a k3d cluster are docker containers running a k3s image.\nAll Nodes of a k3d cluster are part of the same docker network.\n\n```\nk3d [flags]\n```\n\n### Options\n\n```\n  -h, --help         help for k3d\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n      --version      Show k3d and default k3s version\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n* [k3d completion](k3d_completion.md)\t - Generate completion scripts for [bash, zsh, fish, powershell | psh]\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n* [k3d image](k3d_image.md)\t - Handle container images.\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n* [k3d node](k3d_node.md)\t - Manage node(s)\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n* [k3d version](k3d_version.md)\t - Show k3d and default k3s version\n\n","docs/usage/commands/k3d_cluster.md":"## k3d cluster\n\nManage cluster(s)\n\n### Synopsis\n\nManage cluster(s)\n\n```\nk3d cluster [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for cluster\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d cluster create](k3d_cluster_create.md)\t - Create a new cluster\n* [k3d cluster delete](k3d_cluster_delete.md)\t - Delete cluster(s).\n* [k3d cluster edit](k3d_cluster_edit.md)\t - [EXPERIMENTAL] Edit cluster(s).\n* [k3d cluster list](k3d_cluster_list.md)\t - List cluster(s)\n* [k3d cluster start](k3d_cluster_start.md)\t - Start existing k3d cluster(s)\n* [k3d cluster stop](k3d_cluster_stop.md)\t - Stop existing k3d cluster(s)\n\n","docs/usage/commands/k3d_cluster_create.md":"## k3d cluster create\n\nCreate a new cluster\n\n### Synopsis\n\n\nCreate a new k3s cluster with containerized nodes (k3s in docker).\nEvery cluster will consist of one or more containers:\n\n- 1 (or more) server node container (k3s)\n- (optionally) 1 loadbalancer container as the entrypoint to the cluster (nginx)\n- (optionally) 1 (or more) agent node containers (k3s)\n\n\n```\nk3d cluster create NAME [flags]\n```\n\n### Options\n\n```\n  -a, --agents int                                                     Specify how many agents you want to create\n      --agents-memory string                                           Memory limit imposed on the agents nodes [From docker]\n      --api-port [HOST:]HOSTPORT                                       Specify the Kubernetes API server port exposed on the LoadBalancer (Format: [HOST:]HOSTPORT)\n                                                                        - Example: `k3d cluster create --servers 3 --api-port 0.0.0.0:6550`\n  -c, --config string                                                  Path of a config file to use\n  -e, --env KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]                   Add environment variables to nodes (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -e \"HTTP_PROXY=my.proxy.com@server:0\" -e \"SOME_KEY=SOME_VAL@server:0\"`\n      --gpus string                                                    GPU devices to add to the cluster node containers ('all' to pass all GPUs) [From docker]\n  -h, --help                                                           help for create\n      --host-alias ip:host[,host,...]                                  Add ip:host[,host,...] mappings\n      --host-pid-mode                                                  Enable host pid mode of server(s) and agent(s)\n  -i, --image string                                                   Specify k3s image that you want to use for the nodes\n      --k3s-arg ARG@NODEFILTER[;@NODEFILTER]                           Additional args passed to k3s command (Format: ARG@NODEFILTER[;@NODEFILTER])\n                                                                        - Example: `k3d cluster create --k3s-arg \"--disable=traefik@server:0\"`\n      --k3s-node-label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]        Add label to k3s node (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --k3s-node-label \"my.label@agent:0,1\" --k3s-node-label \"other.label=somevalue@server:0\"`\n      --kubeconfig-switch-context                                      Directly switch the default kubeconfig's current-context to the new cluster's context (requires --kubeconfig-update-default) (default true)\n      --kubeconfig-update-default                                      Directly update the default kubeconfig with the new cluster's context (default true)\n      --lb-config-override strings                                     Use dotted YAML path syntax to override nginx loadbalancer settings\n      --network string                                                 Join an existing network\n      --no-image-volume                                                Disable the creation of a volume for importing images\n      --no-lb                                                          Disable the creation of a LoadBalancer in front of the server nodes\n      --no-rollback                                                    Disable the automatic rollback actions, if anything goes wrong\n  -p, --port [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   Map ports from the node containers (via the serverlb) to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                        - Example: `k3d cluster create --agents 2 -p 8080:80@agent:0 -p 8081@agent:1`\n      --registry-config string                                         Specify path to an extra registries.yaml file\n      --registry-create NAME[:HOST][:HOSTPORT]                         Create a k3d-managed registry and connect it to the cluster (Format: NAME[:HOST][:HOSTPORT]\n                                                                        - Example: `k3d cluster create --registry-create mycluster-registry:0.0.0.0:5432`\n      --registry-use stringArray                                       Connect to one or more k3d-managed registries running locally\n      --runtime-label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]         Add label to container runtime (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-label \"my.label@agent:0,1\" --runtime-label \"other.label=somevalue@server:0\"`\n      --runtime-ulimit NAME[=SOFT]:[HARD]                              Add ulimit to container runtime (Format: NAME[=SOFT]:[HARD]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-ulimit \"nofile=1024:1024\" --runtime-ulimit \"noproc=1024:1024\"`\n  -s, --servers int                                                    Specify how many servers you want to create\n      --servers-memory string                                          Memory limit imposed on the server nodes [From docker]\n      --subnet 172.28.0.0/16                                           [Experimental: IPAM] Define a subnet for the newly created container network (Example: 172.28.0.0/16)\n      --timeout duration                                               Rollback changes if cluster couldn't be created in specified duration.\n      --token string                                                   Specify a cluster token. By default, we generate one.\n  -v, --volume [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]              Mount volumes into the nodes (Format: [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -v /my/path@agent:0,1 -v /tmp/test:/tmp/other@server:0`\n      --wait                                                           Wait for the server(s) to be ready before returning. Use '--timeout DURATION' to not wait forever. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_delete.md":"## k3d cluster delete\n\nDelete cluster(s).\n\n### Synopsis\n\nDelete cluster(s).\n\n```\nk3d cluster delete [NAME [NAME ...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all             Delete all existing clusters\n  -c, --config string   Path of a config file to use\n  -h, --help            help for delete\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_edit.md":"## k3d cluster edit\n\n[EXPERIMENTAL] Edit cluster(s).\n\n### Synopsis\n\n[EXPERIMENTAL] Edit cluster(s).\n\n```\nk3d cluster edit CLUSTER [flags]\n```\n\n### Options\n\n```\n  -h, --help                                                               help for edit\n      --port-add [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   [EXPERIMENTAL] Map ports from the node containers (via the serverlb) to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                            - Example: `k3d node edit k3d-mycluster-serverlb --port-add 8080:80`\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_list.md":"## k3d cluster list\n\nList cluster(s)\n\n### Synopsis\n\nList cluster(s).\n\n```\nk3d cluster list [NAME [NAME...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n      --token           Print k3s cluster token\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_start.md":"## k3d cluster start\n\nStart existing k3d cluster(s)\n\n### Synopsis\n\nStart existing k3d cluster(s)\n\n```\nk3d cluster start [NAME [NAME...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all                Start all existing clusters\n  -h, --help               help for start\n      --timeout duration   Maximum waiting time for '--wait' before canceling/returning.\n      --wait               Wait for the server(s) (and loadbalancer) to be ready before returning. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_stop.md":"## k3d cluster stop\n\nStop existing k3d cluster(s)\n\n### Synopsis\n\nStop existing k3d cluster(s).\n\n```\nk3d cluster stop [NAME [NAME...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all    Stop all existing clusters\n  -h, --help   help for stop\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_completion.md":"## k3d completion\n\nGenerate completion scripts for [bash, zsh, fish, powershell | psh]\n\n### Synopsis\n\nTo load completions:\n\nBash:\n\n\t$ source <(k3d completion bash)\n\n\t# To load completions for each session, execute once:\n\t# Linux:\n\t$ k3d completion bash > /etc/bash_completion.d/k3d\n\t# macOS:\n\t$ k3d completion bash > /usr/local/etc/bash_completion.d/k3d\n\nZsh:\n\n\t# If shell completion is not already enabled in your environment,\n\t# you will need to enable it.  You can execute the following once:\n\n\t$ echo \"autoload -U compinit; compinit\" >> ~/.zshrc\n\n\t# To load completions for each session, execute once:\n\t$ k3d completion zsh > \"${fpath[1]}/_k3d\"\n\n\t# You will need to start a new shell for this setup to take effect.\n\nfish:\n\n\t$ k3d completion fish | source\n\n\t# To load completions for each session, execute once:\n\t$ k3d completion fish > ~/.config/fish/completions/k3d.fish\n\nPowerShell:\n\n\tPS> k3d completion powershell | Out-String | Invoke-Expression\n\n\t# To load completions for every new session, run:\n\tPS> k3d completion powershell > k3d.ps1\n\t# and source this file from your PowerShell profile.\n\n\n```\nk3d completion SHELL\n```\n\n### Options\n\n```\n  -h, --help   help for completion\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n\n","docs/usage/commands/k3d_config.md":"## k3d config\n\nWork with config file(s)\n\n### Synopsis\n\nWork with config file(s)\n\n```\nk3d config [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for config\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d config init](k3d_config_init.md)\t - \n* [k3d config migrate](k3d_config_migrate.md)\t - \n\n","docs/usage/commands/k3d_config_init.md":"## k3d config init\n\n\n\n```\nk3d config init [flags]\n```\n\n### Options\n\n```\n  -f, --force           Force overwrite of target file\n  -h, --help            help for init\n  -o, --output string   Write a default k3d config (default \"k3d-default.yaml\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n\n","docs/usage/commands/k3d_config_migrate.md":"## k3d config migrate\n\n\n\n```\nk3d config migrate INPUT [OUTPUT] [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for migrate\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n\n","docs/usage/commands/k3d_image.md":"## k3d image\n\nHandle container images.\n\n### Synopsis\n\nHandle container images.\n\n```\nk3d image [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for image\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d image import](k3d_image_import.md)\t - Import image(s) from docker into k3d cluster(s).\n\n","docs/usage/commands/k3d_image_import.md":"## k3d image import\n\nImport image(s) from docker into k3d cluster(s).\n\n### Synopsis\n\nImport image(s) from docker into k3d cluster(s).\n\nIf an IMAGE starts with the prefix 'docker.io/', then this prefix is stripped internally.\nThat is, 'docker.io/k3d-io/k3d-tools:latest' is treated as 'k3d-io/k3d-tools:latest'.\n\nIf an IMAGE starts with the prefix 'library/' (or 'docker.io/library/'), then this prefix is stripped internally.\nThat is, 'library/busybox:latest' (or 'docker.io/library/busybox:latest') are treated as 'busybox:latest'.\n\nIf an IMAGE does not have a version tag, then ':latest' is assumed.\nThat is, 'k3d-io/k3d-tools' is treated as 'k3d-io/k3d-tools:latest'.\n\nA file ARCHIVE always takes precedence.\nSo if a file './k3d-io/k3d-tools' exists, k3d will try to import it instead of the IMAGE of the same name.\n\n```\nk3d image import [IMAGE | ARCHIVE [IMAGE | ARCHIVE...]] [flags]\n```\n\n### Options\n\n```\n  -c, --cluster stringArray   Select clusters to load the image to. (default [k3s-default])\n  -h, --help                  help for import\n  -k, --keep-tarball          Do not delete the tarball containing the saved images from the shared volume\n  -t, --keep-tools            Do not delete the tools node after import\n  -m, --mode string           Which method to use to import images into the cluster [auto, direct, tools]. See https://k3d.io/stable/usage/importing_images/ (default \"tools-node\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d image](k3d_image.md)\t - Handle container images.\n\n","docs/usage/commands/k3d_kubeconfig.md":"## k3d kubeconfig\n\nManage kubeconfig(s)\n\n### Synopsis\n\nManage kubeconfig(s)\n\n```\nk3d kubeconfig [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for kubeconfig\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d kubeconfig get](k3d_kubeconfig_get.md)\t - Print kubeconfig(s) from cluster(s).\n* [k3d kubeconfig merge](k3d_kubeconfig_merge.md)\t - Write/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n","docs/usage/commands/k3d_kubeconfig_get.md":"## k3d kubeconfig get\n\nPrint kubeconfig(s) from cluster(s).\n\n### Synopsis\n\nPrint kubeconfig(s) from cluster(s).\n\n```\nk3d kubeconfig get [CLUSTER [CLUSTER [...]] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all    Output kubeconfigs from all existing clusters\n  -h, --help   help for get\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n\n","docs/usage/commands/k3d_kubeconfig_merge.md":"## k3d kubeconfig merge\n\nWrite/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n### Synopsis\n\nWrite/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n```\nk3d kubeconfig merge [CLUSTER [CLUSTER [...]] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all                         Get kubeconfigs from all existing clusters\n  -h, --help                        help for merge\n  -d, --kubeconfig-merge-default    Merge into the default kubeconfig ($KUBECONFIG or /home/thklein/.kube/config)\n  -s, --kubeconfig-switch-context   Switch to new context (default true)\n  -o, --output string               Define output [ - | FILE ] (default from $KUBECONFIG or /home/thklein/.kube/config\n      --overwrite                   [Careful!] Overwrite existing file, ignoring its contents\n  -u, --update                      Update conflicting fields in existing kubeconfig (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n\n","docs/usage/commands/k3d_node.md":"## k3d node\n\nManage node(s)\n\n### Synopsis\n\nManage node(s)\n\n```\nk3d node [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for node\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d node create](k3d_node_create.md)\t - Create a new k3s node in docker\n* [k3d node delete](k3d_node_delete.md)\t - Delete node(s).\n* [k3d node edit](k3d_node_edit.md)\t - [EXPERIMENTAL] Edit node(s).\n* [k3d node list](k3d_node_list.md)\t - List node(s)\n* [k3d node start](k3d_node_start.md)\t - Start an existing k3d node\n* [k3d node stop](k3d_node_stop.md)\t - Stop an existing k3d node\n\n","docs/usage/commands/k3d_node_create.md":"## k3d node create\n\nCreate a new k3s node in docker\n\n### Synopsis\n\nCreate a new containerized k3s node (k3s in docker).\n\n```\nk3d node create NAME [flags]\n```\n\n### Options\n\n```\n  -c, --cluster string           Cluster URL or k3d cluster name to connect to. (default \"k3s-default\")\n  -h, --help                     help for create\n  -i, --image string             Specify k3s image used for the node(s) (default: copied from existing node)\n      --k3s-arg stringArray      Additional args passed to k3d command\n      --k3s-node-label strings   Specify k3s node labels in format \"foo=bar\"\n      --memory string            Memory limit imposed on the node [From docker]\n  -n, --network strings          Add node to (another) runtime network\n      --replicas int             Number of replicas of this node specification. (default 1)\n      --role string              Specify node role [server, agent] (default \"agent\")\n      --runtime-label strings    Specify container runtime labels in format \"foo=bar\"\n      --runtime-ulimit strings   Specify container runtime ulimit in format \"ulimit=soft:hard\"\n      --timeout duration         Maximum waiting time for '--wait' before canceling/returning.\n  -t, --token string             Override cluster token (required when connecting to an external cluster)\n      --wait                     Wait for the node(s) to be ready before returning. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_delete.md":"## k3d node delete\n\nDelete node(s).\n\n### Synopsis\n\nDelete node(s).\n\n```\nk3d node delete (NAME | --all) [flags]\n```\n\n### Options\n\n```\n  -a, --all          Delete all existing nodes\n  -h, --help         help for delete\n  -r, --registries   Also delete registries\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_edit.md":"## k3d node edit\n\n[EXPERIMENTAL] Edit node(s).\n\n### Synopsis\n\n[EXPERIMENTAL] Edit node(s).\n\n```\nk3d node edit NODE [flags]\n```\n\n### Options\n\n```\n  -h, --help                                                               help for edit\n      --port-add [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   [EXPERIMENTAL] (serverlb only!) Map ports from the node container to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                            - Example: `k3d node edit k3d-mycluster-serverlb --port-add 8080:80`\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_list.md":"## k3d node list\n\nList node(s)\n\n### Synopsis\n\nList node(s).\n\n```\nk3d node list [NODE [NODE...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_start.md":"## k3d node start\n\nStart an existing k3d node\n\n### Synopsis\n\nStart an existing k3d node.\n\n```\nk3d node start NODE [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for start\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_stop.md":"## k3d node stop\n\nStop an existing k3d node\n\n### Synopsis\n\nStop an existing k3d node.\n\n```\nk3d node stop NAME [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for stop\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_registry.md":"## k3d registry\n\nManage registry/registries\n\n### Synopsis\n\nManage registry/registries\n\n```\nk3d registry [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for registry\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d registry create](k3d_registry_create.md)\t - Create a new registry\n* [k3d registry delete](k3d_registry_delete.md)\t - Delete registry/registries.\n* [k3d registry list](k3d_registry_list.md)\t - List registries\n\n","docs/usage/commands/k3d_registry_create.md":"## k3d registry create\n\nCreate a new registry\n\n### Synopsis\n\nCreate a new registry.\n\n```\nk3d registry create NAME [flags]\n```\n\n### Options\n\n```\n      --default-network string    Specify the network connected to the registry (default \"bridge\")\n  -h, --help                      help for create\n  -i, --image string              Specify image used for the registry (default \"docker.io/library/registry:2\")\n      --no-help                   Disable the help text (How-To use the registry)\n  -p, --port [HOST:]HOSTPORT      Select which port the registry should be listening on on your machine (localhost) (Format: [HOST:]HOSTPORT)\n                                   - Example: `k3d registry create --port 0.0.0.0:5111` (default \"random\")\n      --proxy-password string     Specify the password of the proxied remote registry\n      --proxy-remote-url string   Specify the url of the proxied remote registry\n      --proxy-username string     Specify the username of the proxied remote registry\n  -v, --volume [SOURCE:]DEST      Mount volumes into the registry node (Format: [SOURCE:]DEST\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","docs/usage/commands/k3d_registry_delete.md":"## k3d registry delete\n\nDelete registry/registries.\n\n### Synopsis\n\nDelete registry/registries.\n\n```\nk3d registry delete (NAME | --all) [flags]\n```\n\n### Options\n\n```\n  -a, --all    Delete all existing registries\n  -h, --help   help for delete\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","docs/usage/commands/k3d_registry_list.md":"## k3d registry list\n\nList registries\n\n### Synopsis\n\nList registries.\n\n```\nk3d registry list [NAME [NAME...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","docs/usage/commands/k3d_version.md":"## k3d version\n\nShow k3d and default k3s version\n\n### Synopsis\n\nShow k3d and default k3s version\n\n```\nk3d version [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for version\n  -o, --output string   This will return version information as a different format.  Only json is supported\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d version list](k3d_version_list.md)\t - List k3d/K3s versions. Component can be one of 'k3d', 'k3s', 'k3d-proxy', 'k3d-tools'.\n\n","docs/usage/commands/k3d_version_list.md":"## k3d version list\n\nList k3d/K3s versions. Component can be one of 'k3d', 'k3s', 'k3d-proxy', 'k3d-tools'.\n\n```\nk3d version list COMPONENT [flags]\n```\n\n### Options\n\n```\n  -e, --exclude string   Exclude Regexp (default excludes pre-releases, arch-specific tags and digests) (default \"^sha-|.+(rc|engine|dind|alpha|beta|dev|test|arm|arm64|amd64|s390x).*\")\n  -f, --format string    [DEPRECATED] Use --output instead (default \"raw\")\n  -h, --help             help for list\n  -i, --include string   Include Regexp (default includes everything (default \".*\")\n  -l, --limit int        Limit number of tags in output (0 = unlimited)\n  -o, --output string    Output Format [raw | repo] (default \"raw\")\n  -s, --sort string      Sort Mode (asc | desc | off) (default \"desc\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d version](k3d_version.md)\t - Show k3d and default k3s version\n\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nk3d creates containerized k3s (lightweight Kubernetes) clusters using Docker. It runs multi-node k3s clusters on a single machine. The Go module is `github.com/k3d-io/k3d/v5`.\n\n## Build & Development Commands\n\n```bash\nmake build              # Build for local platform -> bin/k3d\nmake build-debug        # Build with debug symbols\nmake build-cross        # Cross-compile for all platforms (needs gox)\nmake install-tools      # Install required tools (golangci-lint, gox)\n```\n\nDependencies are vendored (`-mod=vendor`). The go.work workspace includes `.`, `./docgen`, and `./tools`.\n\n### Local Helper Image Overrides\n\nWhen developing helper images locally, use these env vars to point k3d at your local builds instead of the published ones (see `pkg/types/env.go`):\n\n```bash\nK3D_IMAGE_LOADBALANCER=ghcr.io/k3d-io/k3d-proxy:dev   # Override the load balancer (proxy) image\nK3D_IMAGE_TOOLS=ghcr.io/k3d-io/k3d-tools:dev           # Override the tools helper image\n```\n\n## Testing\n\n```bash\nmake test                                           # Run all unit tests\ngo test ./pkg/config/... -run TestProcessConfig     # Run a specific test\nmake e2e                                            # Run E2E tests (requires Docker, uses DIND)\nmake e2e -e E2E_INCLUDE=\"test_basic\"                # Run specific E2E test\nmake e2e -e E2E_LOG_LEVEL=trace -e E2E_FAIL_FAST=true  # E2E with debug output\n```\n\nE2E tests are bash scripts in `tests/` that run inside Docker-in-Docker containers. Unit tests use `testify` for assertions and `go-test/deep` for deep equality. Config test assets are in `pkg/config/test_assets/`.\n\n### E2E Test Framework\n\n**Execution chain:** `make e2e` -> `tests/dind.sh` (builds DIND image, starts privileged container) -> `tests/runner.sh` (discovers and batches tests) -> `test_*.sh` scripts.\n\n**Writing a new E2E test:**\n\n1. Create `tests/test_<name>.sh` (the `test_` prefix is required for auto-discovery)\n2. Make it executable (`chmod +x`)\n3. Follow the standard boilerplate:\n   ```bash\n   #!/bin/bash\n   CURR_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n   [ -d \"$CURR_DIR\" ] || { echo \"FATAL: no current dir (maybe running in zsh?)\"; exit 1; }\n   source \"$CURR_DIR/common.sh\"\n\n   ### Step Setup ###\n   LOG_FILE=\"$TEST_OUTPUT_DIR/$( basename \"${BASH_SOURCE[0]}\" ).log\"\n   exec >${LOG_FILE} 2>&1\n   export LOG_FILE\n   KUBECONFIG=\"$KUBECONFIG_ROOT/$( basename \"${BASH_SOURCE[0]}\" ).yaml\"\n   export KUBECONFIG\n   ### Step Setup ###\n\n   export CURRENT_STAGE=\"Test | <name>\"\n   # ... test logic using $EXE, info, failed, check_clusters, etc.\n   exit 0\n   ```\n4. Use unique cluster/resource names to avoid collisions with parallel tests\n5. Always clean up resources (cluster delete, registry delete) at the end\n\n**Key helpers from `tests/common.sh`:** `info`, `failed`, `passed`, `highlight`, `check_clusters`, `check_multi_node`, `check_registry`, `wait_for_pod_running_by_name`, `wait_for_pod_running_by_label`, `exec_in_node`, `docker_assert_container_label`, `k3s_assert_node_label`.\n\n**E2E environment variables:** `E2E_INCLUDE` (run only named tests), `E2E_EXCLUDE` (skip named tests), `E2E_PARALLEL` (default: 4), `E2E_EXTRA` (run `extra_test_*` files), `E2E_FAIL_FAST`, `E2E_LOG_LEVEL`, `E2E_K3S_VERSION`, `E2E_DIND_VERSION`, `E2E_KEEP` (keep runner container).\n\n## Linting & Formatting\n\n```bash\nmake fmt        # Fix formatting (gofmt)\nmake check-fmt  # Check formatting\nmake lint       # Run golangci-lint (v2.4.0)\nmake ci-lint    # Same with 5-minute timeout (CI)\nmake check      # check-fmt + lint\n```\n\n## Architecture\n\nThree-layer design:\n\n1. **CLI layer** (`cmd/`) - Cobra commands for cluster, node, registry, kubeconfig, image, config, debug subcommands. Entry point: `cmd/root.go` -> `NewCmdK3d()`.\n\n2. **Client layer** (`pkg/client/`) - Business logic and orchestration. Key files: `cluster.go` (ClusterCreate/Start/Delete/Run), `node.go` (NodeCreate/Start/Delete), `registry.go`, `loadbalancer.go`, `kubeconfig.go`.\n\n3. **Runtime layer** (`pkg/runtimes/`) - Container runtime abstraction via the `Runtime` interface in `runtime.go`. Only Docker is implemented (`pkg/runtimes/docker/`). The Docker runtime translates k3d types to Docker API calls (`translate.go`).\n\n### Key Packages\n\n- **`pkg/types/`** - Core domain types: `Cluster`, `Node`, `Registry`, `Role` (ServerRole, AgentRole, LoadBalancerRole, RegistryRole). Extensive label system (`k3d.cluster`, `k3d.role`, etc.) used to track Docker container metadata.\n- **`pkg/config/`** - Versioned config system (current: `v1alpha5`, API version `k3d.io/v1alpha5`). Includes migration (`migrate.go`), JSON schema validation (`schema.json` embedded via `//go:embed`), and config processing/transformation pipeline.\n- **`pkg/actions/`** - Node lifecycle hooks (e.g., `WriteFileAction`).\n- **`pkg/logger/`** - Logging via logrus.\n\n### Helper Components\n\n- **`proxy/`** - nginx-based load balancer with confd for dynamic upstream config. Built as `ghcr.io/k3d-io/k3d-proxy`.\n- **`tools/`** - Separate Go module (`tools/`) for the k3d-tools helper binary. Built as `ghcr.io/k3d-io/k3d-tools`.\n\n## Config System\n\nConfig files are YAML with `apiVersion: k3d.io/v1alpha5` and `kind: Simple`. The processing pipeline: read YAML -> validate JSON schema -> migrate from older versions if needed -> transform to internal types -> merge with defaults. Config versions: v1alpha2 (legacy) -> v1alpha3 -> v1alpha4 -> v1alpha5 (current).\n\n## Version & LDFLAGS\n\nVersion info is injected at build time via LDFLAGS into `version/version.go`:\n- `version.Version` - git tag\n- `version.K3sVersion` - latest stable k3s version (fetched from k3s update channel)\n- `version.HelperVersionOverride` - optional override for helper image versions\n\n## License & Contributing\n\nThis project is **MIT licensed** (Copyright 2019-2023 Thorsten Klein). All new Go source files must include the MIT copyright header present in existing files. See `CONTRIBUTING.md` for guidelines — check existing issues/PRs before opening new ones to avoid duplicates. The project follows the Contributor Covenant Code of Conduct (`CODE_OF_CONDUCT.md`).\n\n## Conventions\n\n- All Go source files have the MIT license copyright header\n- Import alias: `k3d \"github.com/k3d-io/k3d/v5/pkg/types\"` is used throughout as the canonical import for the types package\n- Docker is the only runtime, but all container operations go through the `Runtime` interface\n- Node types are identified by `Role` and tracked via Docker container labels\n\n## Issue & PR Handling\n\n**Before starting work on any issue:**\n\n1. **Check for duplicates** — search open and closed issues for the same topic (`gh issue list -S \"keyword\"` / `gh issue list -S \"keyword\" --state closed`)\n2. **Check for existing PRs** — look for open PRs that already address the issue (`gh pr list -S \"keyword\"`)\n3. **Check if it's a k3d issue** — many reports are actually k3s, Docker, or CNI issues. If so, redirect the reporter to the appropriate upstream repo\n4. **Read the full thread** — issues often evolve through discussion; the original request may have been refined or scoped down\n\n**When replying to issues:**\n\n- For questions: answer concisely, point to env vars/flags/docs, close if resolved\n- For bugs: confirm reproducibility scope, check if already fixed on `main`\n- For features: check if there's a workaround, note if a PR would be welcome\n\n**When working on PRs:**\n\n1. **Check the linked issue** — understand the full context and any decisions made in discussion\n2. **Check the PR's CI status** — don't start reviewing or building on a PR that's failing CI for unrelated reasons\n3. **Check for related/conflicting PRs** — look for other open PRs touching the same files (`gh pr list` + review changed files)\n4. **Verify the branch is up to date** with `main` before investing effort\n\n**Scope awareness:**\n\n- k3d only controls the container orchestration layer around k3s. Issues about k3s behavior, CNI plugins, Kubernetes internals, or Docker engine bugs are upstream concerns\n- The proxy (`k3d-proxy`) and tools (`k3d-tools`) images are part of this project — issues about those are in scope\n- Registry issues may involve the upstream `registry` image vs k3d's registry wiring — distinguish which layer is at fault\n\n## Deep Dive References\n\nFor detailed analysis beyond this summary, see `.planning/codebase/`:\n\n| Document | Contents |\n|----------|----------|\n| `STACK.md` | Full dependency inventory, Go version, build toolchain, Docker SDK usage |\n| `ARCHITECTURE.md` | Layer diagrams, data flow through CLI->Client->Runtime, abstraction boundaries |\n| `STRUCTURE.md` | Complete directory layout, file naming conventions, package organization |\n| `CONVENTIONS.md` | Error handling patterns, logging conventions, code style, naming rules |\n| `TESTING.md` | Unit test patterns, E2E test framework details, test helpers, fixture locations |\n| `INTEGRATIONS.md` | Docker API interaction, k3s channel server, registry (wharfie), kubeconfig handling |\n| `CONCERNS.md` | Technical debt, single-runtime limitation, config migration complexity, known fragile areas |\n","docs/usage/commands/k3d.md":"## k3d\n\nhttps://k3d.io/ -> Run k3s in Docker!\n\n### Synopsis\n\nhttps://k3d.io/\nk3d is a wrapper CLI that helps you to easily create k3s clusters inside docker.\nNodes of a k3d cluster are docker containers running a k3s image.\nAll Nodes of a k3d cluster are part of the same docker network.\n\n```\nk3d [flags]\n```\n\n### Options\n\n```\n  -h, --help         help for k3d\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n      --version      Show k3d and default k3s version\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n* [k3d completion](k3d_completion.md)\t - Generate completion scripts for [bash, zsh, fish, powershell | psh]\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n* [k3d image](k3d_image.md)\t - Handle container images.\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n* [k3d node](k3d_node.md)\t - Manage node(s)\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n* [k3d version](k3d_version.md)\t - Show k3d and default k3s version\n\n","docs/usage/commands/k3d_cluster.md":"## k3d cluster\n\nManage cluster(s)\n\n### Synopsis\n\nManage cluster(s)\n\n```\nk3d cluster [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for cluster\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d cluster create](k3d_cluster_create.md)\t - Create a new cluster\n* [k3d cluster delete](k3d_cluster_delete.md)\t - Delete cluster(s).\n* [k3d cluster edit](k3d_cluster_edit.md)\t - [EXPERIMENTAL] Edit cluster(s).\n* [k3d cluster list](k3d_cluster_list.md)\t - List cluster(s)\n* [k3d cluster start](k3d_cluster_start.md)\t - Start existing k3d cluster(s)\n* [k3d cluster stop](k3d_cluster_stop.md)\t - Stop existing k3d cluster(s)\n\n","docs/usage/commands/k3d_cluster_create.md":"## k3d cluster create\n\nCreate a new cluster\n\n### Synopsis\n\n\nCreate a new k3s cluster with containerized nodes (k3s in docker).\nEvery cluster will consist of one or more containers:\n\n- 1 (or more) server node container (k3s)\n- (optionally) 1 loadbalancer container as the entrypoint to the cluster (nginx)\n- (optionally) 1 (or more) agent node containers (k3s)\n\n\n```\nk3d cluster create NAME [flags]\n```\n\n### Options\n\n```\n  -a, --agents int                                                     Specify how many agents you want to create\n      --agents-memory string                                           Memory limit imposed on the agents nodes [From docker]\n      --api-port [HOST:]HOSTPORT                                       Specify the Kubernetes API server port exposed on the LoadBalancer (Format: [HOST:]HOSTPORT)\n                                                                        - Example: `k3d cluster create --servers 3 --api-port 0.0.0.0:6550`\n  -c, --config string                                                  Path of a config file to use\n  -e, --env KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]                   Add environment variables to nodes (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -e \"HTTP_PROXY=my.proxy.com@server:0\" -e \"SOME_KEY=SOME_VAL@server:0\"`\n      --gpus string                                                    GPU devices to add to the cluster node containers ('all' to pass all GPUs) [From docker]\n  -h, --help                                                           help for create\n      --host-alias ip:host[,host,...]                                  Add ip:host[,host,...] mappings\n      --host-pid-mode                                                  Enable host pid mode of server(s) and agent(s)\n  -i, --image string                                                   Specify k3s image that you want to use for the nodes\n      --k3s-arg ARG@NODEFILTER[;@NODEFILTER]                           Additional args passed to k3s command (Format: ARG@NODEFILTER[;@NODEFILTER])\n                                                                        - Example: `k3d cluster create --k3s-arg \"--disable=traefik@server:0\"`\n      --k3s-node-label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]        Add label to k3s node (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --k3s-node-label \"my.label@agent:0,1\" --k3s-node-label \"other.label=somevalue@server:0\"`\n      --kubeconfig-switch-context                                      Directly switch the default kubeconfig's current-context to the new cluster's context (requires --kubeconfig-update-default) (default true)\n      --kubeconfig-update-default                                      Directly update the default kubeconfig with the new cluster's context (default true)\n      --lb-config-override strings                                     Use dotted YAML path syntax to override nginx loadbalancer settings\n      --network string                                                 Join an existing network\n      --no-image-volume                                                Disable the creation of a volume for importing images\n      --no-lb                                                          Disable the creation of a LoadBalancer in front of the server nodes\n      --no-rollback                                                    Disable the automatic rollback actions, if anything goes wrong\n  -p, --port [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   Map ports from the node containers (via the serverlb) to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                        - Example: `k3d cluster create --agents 2 -p 8080:80@agent:0 -p 8081@agent:1`\n      --registry-config string                                         Specify path to an extra registries.yaml file\n      --registry-create NAME[:HOST][:HOSTPORT]                         Create a k3d-managed registry and connect it to the cluster (Format: NAME[:HOST][:HOSTPORT]\n                                                                        - Example: `k3d cluster create --registry-create mycluster-registry:0.0.0.0:5432`\n      --registry-use stringArray                                       Connect to one or more k3d-managed registries running locally\n      --runtime-label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]         Add label to container runtime (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-label \"my.label@agent:0,1\" --runtime-label \"other.label=somevalue@server:0\"`\n      --runtime-ulimit NAME[=SOFT]:[HARD]                              Add ulimit to container runtime (Format: NAME[=SOFT]:[HARD]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-ulimit \"nofile=1024:1024\" --runtime-ulimit \"noproc=1024:1024\"`\n  -s, --servers int                                                    Specify how many servers you want to create\n      --servers-memory string                                          Memory limit imposed on the server nodes [From docker]\n      --subnet 172.28.0.0/16                                           [Experimental: IPAM] Define a subnet for the newly created container network (Example: 172.28.0.0/16)\n      --timeout duration                                               Rollback changes if cluster couldn't be created in specified duration.\n      --token string                                                   Specify a cluster token. By default, we generate one.\n  -v, --volume [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]              Mount volumes into the nodes (Format: [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -v /my/path@agent:0,1 -v /tmp/test:/tmp/other@server:0`\n      --wait                                                           Wait for the server(s) to be ready before returning. Use '--timeout DURATION' to not wait forever. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_delete.md":"## k3d cluster delete\n\nDelete cluster(s).\n\n### Synopsis\n\nDelete cluster(s).\n\n```\nk3d cluster delete [NAME [NAME ...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all             Delete all existing clusters\n  -c, --config string   Path of a config file to use\n  -h, --help            help for delete\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_edit.md":"## k3d cluster edit\n\n[EXPERIMENTAL] Edit cluster(s).\n\n### Synopsis\n\n[EXPERIMENTAL] Edit cluster(s).\n\n```\nk3d cluster edit CLUSTER [flags]\n```\n\n### Options\n\n```\n  -h, --help                                                               help for edit\n      --port-add [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   [EXPERIMENTAL] Map ports from the node containers (via the serverlb) to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                            - Example: `k3d node edit k3d-mycluster-serverlb --port-add 8080:80`\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_list.md":"## k3d cluster list\n\nList cluster(s)\n\n### Synopsis\n\nList cluster(s).\n\n```\nk3d cluster list [NAME [NAME...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n      --token           Print k3s cluster token\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_start.md":"## k3d cluster start\n\nStart existing k3d cluster(s)\n\n### Synopsis\n\nStart existing k3d cluster(s)\n\n```\nk3d cluster start [NAME [NAME...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all                Start all existing clusters\n  -h, --help               help for start\n      --timeout duration   Maximum waiting time for '--wait' before canceling/returning.\n      --wait               Wait for the server(s) (and loadbalancer) to be ready before returning. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_cluster_stop.md":"## k3d cluster stop\n\nStop existing k3d cluster(s)\n\n### Synopsis\n\nStop existing k3d cluster(s).\n\n```\nk3d cluster stop [NAME [NAME...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all    Stop all existing clusters\n  -h, --help   help for stop\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","docs/usage/commands/k3d_completion.md":"## k3d completion\n\nGenerate completion scripts for [bash, zsh, fish, powershell | psh]\n\n### Synopsis\n\nTo load completions:\n\nBash:\n\n\t$ source <(k3d completion bash)\n\n\t# To load completions for each session, execute once:\n\t# Linux:\n\t$ k3d completion bash > /etc/bash_completion.d/k3d\n\t# macOS:\n\t$ k3d completion bash > /usr/local/etc/bash_completion.d/k3d\n\nZsh:\n\n\t# If shell completion is not already enabled in your environment,\n\t# you will need to enable it.  You can execute the following once:\n\n\t$ echo \"autoload -U compinit; compinit\" >> ~/.zshrc\n\n\t# To load completions for each session, execute once:\n\t$ k3d completion zsh > \"${fpath[1]}/_k3d\"\n\n\t# You will need to start a new shell for this setup to take effect.\n\nfish:\n\n\t$ k3d completion fish | source\n\n\t# To load completions for each session, execute once:\n\t$ k3d completion fish > ~/.config/fish/completions/k3d.fish\n\nPowerShell:\n\n\tPS> k3d completion powershell | Out-String | Invoke-Expression\n\n\t# To load completions for every new session, run:\n\tPS> k3d completion powershell > k3d.ps1\n\t# and source this file from your PowerShell profile.\n\n\n```\nk3d completion SHELL\n```\n\n### Options\n\n```\n  -h, --help   help for completion\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n\n","docs/usage/commands/k3d_config.md":"## k3d config\n\nWork with config file(s)\n\n### Synopsis\n\nWork with config file(s)\n\n```\nk3d config [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for config\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d config init](k3d_config_init.md)\t - \n* [k3d config migrate](k3d_config_migrate.md)\t - \n\n","docs/usage/commands/k3d_config_init.md":"## k3d config init\n\n\n\n```\nk3d config init [flags]\n```\n\n### Options\n\n```\n  -f, --force           Force overwrite of target file\n  -h, --help            help for init\n  -o, --output string   Write a default k3d config (default \"k3d-default.yaml\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n\n","docs/usage/commands/k3d_config_migrate.md":"## k3d config migrate\n\n\n\n```\nk3d config migrate INPUT [OUTPUT] [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for migrate\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n\n","docs/usage/commands/k3d_image.md":"## k3d image\n\nHandle container images.\n\n### Synopsis\n\nHandle container images.\n\n```\nk3d image [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for image\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d image import](k3d_image_import.md)\t - Import image(s) from docker into k3d cluster(s).\n\n","docs/usage/commands/k3d_image_import.md":"## k3d image import\n\nImport image(s) from docker into k3d cluster(s).\n\n### Synopsis\n\nImport image(s) from docker into k3d cluster(s).\n\nIf an IMAGE starts with the prefix 'docker.io/', then this prefix is stripped internally.\nThat is, 'docker.io/k3d-io/k3d-tools:latest' is treated as 'k3d-io/k3d-tools:latest'.\n\nIf an IMAGE starts with the prefix 'library/' (or 'docker.io/library/'), then this prefix is stripped internally.\nThat is, 'library/busybox:latest' (or 'docker.io/library/busybox:latest') are treated as 'busybox:latest'.\n\nIf an IMAGE does not have a version tag, then ':latest' is assumed.\nThat is, 'k3d-io/k3d-tools' is treated as 'k3d-io/k3d-tools:latest'.\n\nA file ARCHIVE always takes precedence.\nSo if a file './k3d-io/k3d-tools' exists, k3d will try to import it instead of the IMAGE of the same name.\n\n```\nk3d image import [IMAGE | ARCHIVE [IMAGE | ARCHIVE...]] [flags]\n```\n\n### Options\n\n```\n  -c, --cluster stringArray   Select clusters to load the image to. (default [k3s-default])\n  -h, --help                  help for import\n  -k, --keep-tarball          Do not delete the tarball containing the saved images from the shared volume\n  -t, --keep-tools            Do not delete the tools node after import\n  -m, --mode string           Which method to use to import images into the cluster [auto, direct, tools]. See https://k3d.io/stable/usage/importing_images/ (default \"tools-node\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d image](k3d_image.md)\t - Handle container images.\n\n","docs/usage/commands/k3d_kubeconfig.md":"## k3d kubeconfig\n\nManage kubeconfig(s)\n\n### Synopsis\n\nManage kubeconfig(s)\n\n```\nk3d kubeconfig [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for kubeconfig\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d kubeconfig get](k3d_kubeconfig_get.md)\t - Print kubeconfig(s) from cluster(s).\n* [k3d kubeconfig merge](k3d_kubeconfig_merge.md)\t - Write/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n","docs/usage/commands/k3d_kubeconfig_get.md":"## k3d kubeconfig get\n\nPrint kubeconfig(s) from cluster(s).\n\n### Synopsis\n\nPrint kubeconfig(s) from cluster(s).\n\n```\nk3d kubeconfig get [CLUSTER [CLUSTER [...]] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all    Output kubeconfigs from all existing clusters\n  -h, --help   help for get\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n\n","docs/usage/commands/k3d_kubeconfig_merge.md":"## k3d kubeconfig merge\n\nWrite/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n### Synopsis\n\nWrite/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n```\nk3d kubeconfig merge [CLUSTER [CLUSTER [...]] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all                         Get kubeconfigs from all existing clusters\n  -h, --help                        help for merge\n  -d, --kubeconfig-merge-default    Merge into the default kubeconfig ($KUBECONFIG or /home/thklein/.kube/config)\n  -s, --kubeconfig-switch-context   Switch to new context (default true)\n  -o, --output string               Define output [ - | FILE ] (default from $KUBECONFIG or /home/thklein/.kube/config\n      --overwrite                   [Careful!] Overwrite existing file, ignoring its contents\n  -u, --update                      Update conflicting fields in existing kubeconfig (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n\n","docs/usage/commands/k3d_node.md":"## k3d node\n\nManage node(s)\n\n### Synopsis\n\nManage node(s)\n\n```\nk3d node [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for node\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d node create](k3d_node_create.md)\t - Create a new k3s node in docker\n* [k3d node delete](k3d_node_delete.md)\t - Delete node(s).\n* [k3d node edit](k3d_node_edit.md)\t - [EXPERIMENTAL] Edit node(s).\n* [k3d node list](k3d_node_list.md)\t - List node(s)\n* [k3d node start](k3d_node_start.md)\t - Start an existing k3d node\n* [k3d node stop](k3d_node_stop.md)\t - Stop an existing k3d node\n\n","docs/usage/commands/k3d_node_create.md":"## k3d node create\n\nCreate a new k3s node in docker\n\n### Synopsis\n\nCreate a new containerized k3s node (k3s in docker).\n\n```\nk3d node create NAME [flags]\n```\n\n### Options\n\n```\n  -c, --cluster string           Cluster URL or k3d cluster name to connect to. (default \"k3s-default\")\n  -h, --help                     help for create\n  -i, --image string             Specify k3s image used for the node(s) (default: copied from existing node)\n      --k3s-arg stringArray      Additional args passed to k3d command\n      --k3s-node-label strings   Specify k3s node labels in format \"foo=bar\"\n      --memory string            Memory limit imposed on the node [From docker]\n  -n, --network strings          Add node to (another) runtime network\n      --replicas int             Number of replicas of this node specification. (default 1)\n      --role string              Specify node role [server, agent] (default \"agent\")\n      --runtime-label strings    Specify container runtime labels in format \"foo=bar\"\n      --runtime-ulimit strings   Specify container runtime ulimit in format \"ulimit=soft:hard\"\n      --timeout duration         Maximum waiting time for '--wait' before canceling/returning.\n  -t, --token string             Override cluster token (required when connecting to an external cluster)\n      --wait                     Wait for the node(s) to be ready before returning. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_delete.md":"## k3d node delete\n\nDelete node(s).\n\n### Synopsis\n\nDelete node(s).\n\n```\nk3d node delete (NAME | --all) [flags]\n```\n\n### Options\n\n```\n  -a, --all          Delete all existing nodes\n  -h, --help         help for delete\n  -r, --registries   Also delete registries\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_edit.md":"## k3d node edit\n\n[EXPERIMENTAL] Edit node(s).\n\n### Synopsis\n\n[EXPERIMENTAL] Edit node(s).\n\n```\nk3d node edit NODE [flags]\n```\n\n### Options\n\n```\n  -h, --help                                                               help for edit\n      --port-add [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   [EXPERIMENTAL] (serverlb only!) Map ports from the node container to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                            - Example: `k3d node edit k3d-mycluster-serverlb --port-add 8080:80`\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_list.md":"## k3d node list\n\nList node(s)\n\n### Synopsis\n\nList node(s).\n\n```\nk3d node list [NODE [NODE...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_start.md":"## k3d node start\n\nStart an existing k3d node\n\n### Synopsis\n\nStart an existing k3d node.\n\n```\nk3d node start NODE [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for start\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_node_stop.md":"## k3d node stop\n\nStop an existing k3d node\n\n### Synopsis\n\nStop an existing k3d node.\n\n```\nk3d node stop NAME [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for stop\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","docs/usage/commands/k3d_registry.md":"## k3d registry\n\nManage registry/registries\n\n### Synopsis\n\nManage registry/registries\n\n```\nk3d registry [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for registry\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d registry create](k3d_registry_create.md)\t - Create a new registry\n* [k3d registry delete](k3d_registry_delete.md)\t - Delete registry/registries.\n* [k3d registry list](k3d_registry_list.md)\t - List registries\n\n","docs/usage/commands/k3d_registry_create.md":"## k3d registry create\n\nCreate a new registry\n\n### Synopsis\n\nCreate a new registry.\n\n```\nk3d registry create NAME [flags]\n```\n\n### Options\n\n```\n      --default-network string    Specify the network connected to the registry (default \"bridge\")\n  -h, --help                      help for create\n  -i, --image string              Specify image used for the registry (default \"docker.io/library/registry:2\")\n      --no-help                   Disable the help text (How-To use the registry)\n  -p, --port [HOST:]HOSTPORT      Select which port the registry should be listening on on your machine (localhost) (Format: [HOST:]HOSTPORT)\n                                   - Example: `k3d registry create --port 0.0.0.0:5111` (default \"random\")\n      --proxy-password string     Specify the password of the proxied remote registry\n      --proxy-remote-url string   Specify the url of the proxied remote registry\n      --proxy-username string     Specify the username of the proxied remote registry\n  -v, --volume [SOURCE:]DEST      Mount volumes into the registry node (Format: [SOURCE:]DEST\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","docs/usage/commands/k3d_registry_delete.md":"## k3d registry delete\n\nDelete registry/registries.\n\n### Synopsis\n\nDelete registry/registries.\n\n```\nk3d registry delete (NAME | --all) [flags]\n```\n\n### Options\n\n```\n  -a, --all    Delete all existing registries\n  -h, --help   help for delete\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","docs/usage/commands/k3d_registry_list.md":"## k3d registry list\n\nList registries\n\n### Synopsis\n\nList registries.\n\n```\nk3d registry list [NAME [NAME...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","docs/usage/commands/k3d_version.md":"## k3d version\n\nShow k3d and default k3s version\n\n### Synopsis\n\nShow k3d and default k3s version\n\n```\nk3d version [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for version\n  -o, --output string   This will return version information as a different format.  Only json is supported\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d version list](k3d_version_list.md)\t - List k3d/K3s versions. Component can be one of 'k3d', 'k3s', 'k3d-proxy', 'k3d-tools'.\n\n","docs/usage/commands/k3d_version_list.md":"## k3d version list\n\nList k3d/K3s versions. Component can be one of 'k3d', 'k3s', 'k3d-proxy', 'k3d-tools'.\n\n```\nk3d version list COMPONENT [flags]\n```\n\n### Options\n\n```\n  -e, --exclude string   Exclude Regexp (default excludes pre-releases, arch-specific tags and digests) (default \"^sha-|.+(rc|engine|dind|alpha|beta|dev|test|arm|arm64|amd64|s390x).*\")\n  -f, --format string    [DEPRECATED] Use --output instead (default \"raw\")\n  -h, --help             help for list\n  -i, --include string   Include Regexp (default includes everything (default \".*\")\n  -l, --limit int        Limit number of tags in output (0 = unlimited)\n  -o, --output string    Output Format [raw | repo] (default \"raw\")\n  -s, --sort string      Sort Mode (asc | desc | off) (default \"desc\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d version](k3d_version.md)\t - Show k3d and default k3s version\n\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nk3d creates containerized k3s (lightweight Kubernetes) clusters using Docker. It runs multi-node k3s clusters on a single machine. The Go module is `github.com/k3d-io/k3d/v5`.\n\n## Build & Development Commands\n\n```bash\nmake build              # Build for local platform -> bin/k3d\nmake build-debug        # Build with debug symbols\nmake build-cross        # Cross-compile for all platforms (needs gox)\nmake install-tools      # Install required tools (golangci-lint, gox)\n```\n\nDependencies are vendored (`-mod=vendor`). The go.work workspace includes `.`, `./docgen`, and `./tools`.\n\n### Local Helper Image Overrides\n\nWhen developing helper images locally, use these env vars to point k3d at your local builds instead of the published ones (see `pkg/types/env.go`):\n\n```bash\nK3D_IMAGE_LOADBALANCER=ghcr.io/k3d-io/k3d-proxy:dev   # Override the load balancer (proxy) image\nK3D_IMAGE_TOOLS=ghcr.io/k3d-io/k3d-tools:dev           # Override the tools helper image\n```\n\n## Testing\n\n```bash\nmake test                                           # Run all unit tests\ngo test ./pkg/config/... -run TestProcessConfig     # Run a specific test\nmake e2e                                            # Run E2E tests (requires Docker, uses DIND)\nmake e2e -e E2E_INCLUDE=\"test_basic\"                # Run specific E2E test\nmake e2e -e E2E_LOG_LEVEL=trace -e E2E_FAIL_FAST=true  # E2E with debug output\n```\n\nE2E tests are bash scripts in `tests/` that run inside Docker-in-Docker containers. Unit tests use `testify` for assertions and `go-test/deep` for deep equality. Config test assets are in `pkg/config/test_assets/`.\n\n### E2E Test Framework\n\n**Execution chain:** `make e2e` -> `tests/dind.sh` (builds DIND image, starts privileged container) -> `tests/runner.sh` (discovers and batches tests) -> `test_*.sh` scripts.\n\n**Writing a new E2E test:**\n\n1. Create `tests/test_<name>.sh` (the `test_` prefix is required for auto-discovery)\n2. Make it executable (`chmod +x`)\n3. Follow the standard boilerplate:\n   ```bash\n   #!/bin/bash\n   CURR_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n   [ -d \"$CURR_DIR\" ] || { echo \"FATAL: no current dir (maybe running in zsh?)\"; exit 1; }\n   source \"$CURR_DIR/common.sh\"\n\n   ### Step Setup ###\n   LOG_FILE=\"$TEST_OUTPUT_DIR/$( basename \"${BASH_SOURCE[0]}\" ).log\"\n   exec >${LOG_FILE} 2>&1\n   export LOG_FILE\n   KUBECONFIG=\"$KUBECONFIG_ROOT/$( basename \"${BASH_SOURCE[0]}\" ).yaml\"\n   export KUBECONFIG\n   ### Step Setup ###\n\n   export CURRENT_STAGE=\"Test | <name>\"\n   # ... test logic using $EXE, info, failed, check_clusters, etc.\n   exit 0\n   ```\n4. Use unique cluster/resource names to avoid collisions with parallel tests\n5. Always clean up resources (cluster delete, registry delete) at the end\n\n**Key helpers from `tests/common.sh`:** `info`, `failed`, `passed`, `highlight`, `check_clusters`, `check_multi_node`, `check_registry`, `wait_for_pod_running_by_name`, `wait_for_pod_running_by_label`, `exec_in_node`, `docker_assert_container_label`, `k3s_assert_node_label`.\n\n**E2E environment variables:** `E2E_INCLUDE` (run only named tests), `E2E_EXCLUDE` (skip named tests), `E2E_PARALLEL` (default: 4), `E2E_EXTRA` (run `extra_test_*` files), `E2E_FAIL_FAST`, `E2E_LOG_LEVEL`, `E2E_K3S_VERSION`, `E2E_DIND_VERSION`, `E2E_KEEP` (keep runner container).\n\n## Linting & Formatting\n\n```bash\nmake fmt        # Fix formatting (gofmt)\nmake check-fmt  # Check formatting\nmake lint       # Run golangci-lint (v2.4.0)\nmake ci-lint    # Same with 5-minute timeout (CI)\nmake check      # check-fmt + lint\n```\n\n## Architecture\n\nThree-layer design:\n\n1. **CLI layer** (`cmd/`) - Cobra commands for cluster, node, registry, kubeconfig, image, config, debug subcommands. Entry point: `cmd/root.go` -> `NewCmdK3d()`.\n\n2. **Client layer** (`pkg/client/`) - Business logic and orchestration. Key files: `cluster.go` (ClusterCreate/Start/Delete/Run), `node.go` (NodeCreate/Start/Delete), `registry.go`, `loadbalancer.go`, `kubeconfig.go`.\n\n3. **Runtime layer** (`pkg/runtimes/`) - Container runtime abstraction via the `Runtime` interface in `runtime.go`. Only Docker is implemented (`pkg/runtimes/docker/`). The Docker runtime translates k3d types to Docker API calls (`translate.go`).\n\n### Key Packages\n\n- **`pkg/types/`** - Core domain types: `Cluster`, `Node`, `Registry`, `Role` (ServerRole, AgentRole, LoadBalancerRole, RegistryRole). Extensive label system (`k3d.cluster`, `k3d.role`, etc.) used to track Docker container metadata.\n- **`pkg/config/`** - Versioned config system (current: `v1alpha5`, API version `k3d.io/v1alpha5`). Includes migration (`migrate.go`), JSON schema validation (`schema.json` embedded via `//go:embed`), and config processing/transformation pipeline.\n- **`pkg/actions/`** - Node lifecycle hooks (e.g., `WriteFileAction`).\n- **`pkg/logger/`** - Logging via logrus.\n\n### Helper Components\n\n- **`proxy/`** - nginx-based load balancer with confd for dynamic upstream config. Built as `ghcr.io/k3d-io/k3d-proxy`.\n- **`tools/`** - Separate Go module (`tools/`) for the k3d-tools helper binary. Built as `ghcr.io/k3d-io/k3d-tools`.\n\n## Config System\n\nConfig files are YAML with `apiVersion: k3d.io/v1alpha5` and `kind: Simple`. The processing pipeline: read YAML -> validate JSON schema -> migrate from older versions if needed -> transform to internal types -> merge with defaults. Config versions: v1alpha2 (legacy) -> v1alpha3 -> v1alpha4 -> v1alpha5 (current).\n\n## Version & LDFLAGS\n\nVersion info is injected at build time via LDFLAGS into `version/version.go`:\n- `version.Version` - git tag\n- `version.K3sVersion` - latest stable k3s version (fetched from k3s update channel)\n- `version.HelperVersionOverride` - optional override for helper image versions\n\n## License & Contributing\n\nThis project is **MIT licensed** (Copyright 2019-2023 Thorsten Klein). All new Go source files must include the MIT copyright header present in existing files. See `CONTRIBUTING.md` for guidelines — check existing issues/PRs before opening new ones to avoid duplicates. The project follows the Contributor Covenant Code of Conduct (`CODE_OF_CONDUCT.md`).\n\n## Conventions\n\n- All Go source files have the MIT license copyright header\n- Import alias: `k3d \"github.com/k3d-io/k3d/v5/pkg/types\"` is used throughout as the canonical import for the types package\n- Docker is the only runtime, but all container operations go through the `Runtime` interface\n- Node types are identified by `Role` and tracked via Docker container labels\n\n## Issue & PR Handling\n\n**Before starting work on any issue:**\n\n1. **Check for duplicates** — search open and closed issues for the same topic (`gh issue list -S \"keyword\"` / `gh issue list -S \"keyword\" --state closed`)\n2. **Check for existing PRs** — look for open PRs that already address the issue (`gh pr list -S \"keyword\"`)\n3. **Check if it's a k3d issue** — many reports are actually k3s, Docker, or CNI issues. If so, redirect the reporter to the appropriate upstream repo\n4. **Read the full thread** — issues often evolve through discussion; the original request may have been refined or scoped down\n\n**When replying to issues:**\n\n- For questions: answer concisely, point to env vars/flags/docs, close if resolved\n- For bugs: confirm reproducibility scope, check if already fixed on `main`\n- For features: check if there's a workaround, note if a PR would be welcome\n\n**When working on PRs:**\n\n1. **Check the linked issue** — understand the full context and any decisions made in discussion\n2. **Check the PR's CI status** — don't start reviewing or building on a PR that's failing CI for unrelated reasons\n3. **Check for related/conflicting PRs** — look for other open PRs touching the same files (`gh pr list` + review changed files)\n4. **Verify the branch is up to date** with `main` before investing effort\n\n**Scope awareness:**\n\n- k3d only controls the container orchestration layer around k3s. Issues about k3s behavior, CNI plugins, Kubernetes internals, or Docker engine bugs are upstream concerns\n- The proxy (`k3d-proxy`) and tools (`k3d-tools`) images are part of this project — issues about those are in scope\n- Registry issues may involve the upstream `registry` image vs k3d's registry wiring — distinguish which layer is at fault\n\n## Deep Dive References\n\nFor detailed analysis beyond this summary, see `.planning/codebase/`:\n\n| Document | Contents |\n|----------|----------|\n| `STACK.md` | Full dependency inventory, Go version, build toolchain, Docker SDK usage |\n| `ARCHITECTURE.md` | Layer diagrams, data flow through CLI->Client->Runtime, abstraction boundaries |\n| `STRUCTURE.md` | Complete directory layout, file naming conventions, package organization |\n| `CONVENTIONS.md` | Error handling patterns, logging conventions, code style, naming rules |\n| `TESTING.md` | Unit test patterns, E2E test framework details, test helpers, fixture locations |\n| `INTEGRATIONS.md` | Docker API interaction, k3s channel server, registry (wharfie), kubeconfig handling |\n| `CONCERNS.md` | Technical debt, single-runtime limitation, config migration complexity, known fragile areas |\n","isInternal":false,"tokens":2382,"sizeBytes":9235},{"name":"k3d_cluster_create.md","path":"docs/usage/commands/k3d_cluster_create.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_cluster_create.md","title":"Command: /k3d_cluster_create","category":"command-prompt","format":"markdown","content":"## k3d cluster create\n\nCreate a new cluster\n\n### Synopsis\n\n\nCreate a new k3s cluster with containerized nodes (k3s in docker).\nEvery cluster will consist of one or more containers:\n\n- 1 (or more) server node container (k3s)\n- (optionally) 1 loadbalancer container as the entrypoint to the cluster (nginx)\n- (optionally) 1 (or more) agent node containers (k3s)\n\n\n```\nk3d cluster create NAME [flags]\n```\n\n### Options\n\n```\n  -a, --agents int                                                     Specify how many agents you want to create\n      --agents-memory string                                           Memory limit imposed on the agents nodes [From docker]\n      --api-port [HOST:]HOSTPORT                                       Specify the Kubernetes API server port exposed on the LoadBalancer (Format: [HOST:]HOSTPORT)\n                                                                        - Example: `k3d cluster create --servers 3 --api-port 0.0.0.0:6550`\n  -c, --config string                                                  Path of a config file to use\n  -e, --env KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]                   Add environment variables to nodes (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -e \"HTTP_PROXY=my.proxy.com@server:0\" -e \"SOME_KEY=SOME_VAL@server:0\"`\n      --gpus string                                                    GPU devices to add to the cluster node containers ('all' to pass all GPUs) [From docker]\n  -h, --help                                                           help for create\n      --host-alias ip:host[,host,...]                                  Add ip:host[,host,...] mappings\n      --host-pid-mode                                                  Enable host pid mode of server(s) and agent(s)\n  -i, --image string                                                   Specify k3s image that you want to use for the nodes\n      --k3s-arg ARG@NODEFILTER[;@NODEFILTER]                           Additional args passed to k3s command (Format: ARG@NODEFILTER[;@NODEFILTER])\n                                                                        - Example: `k3d cluster create --k3s-arg \"--disable=traefik@server:0\"`\n      --k3s-node-label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]        Add label to k3s node (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --k3s-node-label \"my.label@agent:0,1\" --k3s-node-label \"other.label=somevalue@server:0\"`\n      --kubeconfig-switch-context                                      Directly switch the default kubeconfig's current-context to the new cluster's context (requires --kubeconfig-update-default) (default true)\n      --kubeconfig-update-default                                      Directly update the default kubeconfig with the new cluster's context (default true)\n      --lb-config-override strings                                     Use dotted YAML path syntax to override nginx loadbalancer settings\n      --network string                                                 Join an existing network\n      --no-image-volume                                                Disable the creation of a volume for importing images\n      --no-lb                                                          Disable the creation of a LoadBalancer in front of the server nodes\n      --no-rollback                                                    Disable the automatic rollback actions, if anything goes wrong\n  -p, --port [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   Map ports from the node containers (via the serverlb) to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                        - Example: `k3d cluster create --agents 2 -p 8080:80@agent:0 -p 8081@agent:1`\n      --registry-config string                                         Specify path to an extra registries.yaml file\n      --registry-create NAME[:HOST][:HOSTPORT]                         Create a k3d-managed registry and connect it to the cluster (Format: NAME[:HOST][:HOSTPORT]\n                                                                        - Example: `k3d cluster create --registry-create mycluster-registry:0.0.0.0:5432`\n      --registry-use stringArray                                       Connect to one or more k3d-managed registries running locally\n      --runtime-label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]         Add label to container runtime (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-label \"my.label@agent:0,1\" --runtime-label \"other.label=somevalue@server:0\"`\n      --runtime-ulimit NAME[=SOFT]:[HARD]                              Add ulimit to container runtime (Format: NAME[=SOFT]:[HARD]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-ulimit \"nofile=1024:1024\" --runtime-ulimit \"noproc=1024:1024\"`\n  -s, --servers int                                                    Specify how many servers you want to create\n      --servers-memory string                                          Memory limit imposed on the server nodes [From docker]\n      --subnet 172.28.0.0/16                                           [Experimental: IPAM] Define a subnet for the newly created container network (Example: 172.28.0.0/16)\n      --timeout duration                                               Rollback changes if cluster couldn't be created in specified duration.\n      --token string                                                   Specify a cluster token. By default, we generate one.\n  -v, --volume [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]              Mount volumes into the nodes (Format: [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -v /my/path@agent:0,1 -v /tmp/test:/tmp/other@server:0`\n      --wait                                                           Wait for the server(s) to be ready before returning. Use '--timeout DURATION' to not wait forever. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","isInternal":false,"tokens":1359,"sizeBytes":6706},{"name":"k3d_cluster_delete.md","path":"docs/usage/commands/k3d_cluster_delete.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_cluster_delete.md","title":"Command: /k3d_cluster_delete","category":"command-prompt","format":"markdown","content":"## k3d cluster delete\n\nDelete cluster(s).\n\n### Synopsis\n\nDelete cluster(s).\n\n```\nk3d cluster delete [NAME [NAME ...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all             Delete all existing clusters\n  -c, --config string   Path of a config file to use\n  -h, --help            help for delete\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","isInternal":false,"tokens":151,"sizeBytes":595},{"name":"k3d_cluster_edit.md","path":"docs/usage/commands/k3d_cluster_edit.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_cluster_edit.md","title":"Command: /k3d_cluster_edit","category":"command-prompt","format":"markdown","content":"## k3d cluster edit\n\n[EXPERIMENTAL] Edit cluster(s).\n\n### Synopsis\n\n[EXPERIMENTAL] Edit cluster(s).\n\n```\nk3d cluster edit CLUSTER [flags]\n```\n\n### Options\n\n```\n  -h, --help                                                               help for edit\n      --port-add [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   [EXPERIMENTAL] Map ports from the node containers (via the serverlb) to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                            - Example: `k3d node edit k3d-mycluster-serverlb --port-add 8080:80`\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","isInternal":false,"tokens":219,"sizeBytes":909},{"name":"k3d_cluster_list.md","path":"docs/usage/commands/k3d_cluster_list.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_cluster_list.md","title":"Command: /k3d_cluster_list","category":"command-prompt","format":"markdown","content":"## k3d cluster list\n\nList cluster(s)\n\n### Synopsis\n\nList cluster(s).\n\n```\nk3d cluster list [NAME [NAME...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n      --token           Print k3s cluster token\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","isInternal":false,"tokens":157,"sizeBytes":614},{"name":"k3d_cluster_start.md","path":"docs/usage/commands/k3d_cluster_start.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_cluster_start.md","title":"Command: /k3d_cluster_start","category":"command-prompt","format":"markdown","content":"## k3d cluster start\n\nStart existing k3d cluster(s)\n\n### Synopsis\n\nStart existing k3d cluster(s)\n\n```\nk3d cluster start [NAME [NAME...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all                Start all existing clusters\n  -h, --help               help for start\n      --timeout duration   Maximum waiting time for '--wait' before canceling/returning.\n      --wait               Wait for the server(s) (and loadbalancer) to be ready before returning. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","isInternal":false,"tokens":187,"sizeBytes":768},{"name":"k3d_cluster_stop.md","path":"docs/usage/commands/k3d_cluster_stop.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_cluster_stop.md","title":"Command: /k3d_cluster_stop","category":"command-prompt","format":"markdown","content":"## k3d cluster stop\n\nStop existing k3d cluster(s)\n\n### Synopsis\n\nStop existing k3d cluster(s).\n\n```\nk3d cluster stop [NAME [NAME...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all    Stop all existing clusters\n  -h, --help   help for stop\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n","isInternal":false,"tokens":142,"sizeBytes":536},{"name":"k3d_cluster.md","path":"docs/usage/commands/k3d_cluster.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_cluster.md","title":"Command: /k3d_cluster","category":"command-prompt","format":"markdown","content":"## k3d cluster\n\nManage cluster(s)\n\n### Synopsis\n\nManage cluster(s)\n\n```\nk3d cluster [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for cluster\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d cluster create](k3d_cluster_create.md)\t - Create a new cluster\n* [k3d cluster delete](k3d_cluster_delete.md)\t - Delete cluster(s).\n* [k3d cluster edit](k3d_cluster_edit.md)\t - [EXPERIMENTAL] Edit cluster(s).\n* [k3d cluster list](k3d_cluster_list.md)\t - List cluster(s)\n* [k3d cluster start](k3d_cluster_start.md)\t - Start existing k3d cluster(s)\n* [k3d cluster stop](k3d_cluster_stop.md)\t - Stop existing k3d cluster(s)\n\n","isInternal":false,"tokens":261,"sizeBytes":870},{"name":"k3d_completion.md","path":"docs/usage/commands/k3d_completion.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_completion.md","title":"Command: /k3d_completion","category":"command-prompt","format":"markdown","content":"## k3d completion\n\nGenerate completion scripts for [bash, zsh, fish, powershell | psh]\n\n### Synopsis\n\nTo load completions:\n\nBash:\n\n\t$ source <(k3d completion bash)\n\n\t# To load completions for each session, execute once:\n\t# Linux:\n\t$ k3d completion bash > /etc/bash_completion.d/k3d\n\t# macOS:\n\t$ k3d completion bash > /usr/local/etc/bash_completion.d/k3d\n\nZsh:\n\n\t# If shell completion is not already enabled in your environment,\n\t# you will need to enable it.  You can execute the following once:\n\n\t$ echo \"autoload -U compinit; compinit\" >> ~/.zshrc\n\n\t# To load completions for each session, execute once:\n\t$ k3d completion zsh > \"${fpath[1]}/_k3d\"\n\n\t# You will need to start a new shell for this setup to take effect.\n\nfish:\n\n\t$ k3d completion fish | source\n\n\t# To load completions for each session, execute once:\n\t$ k3d completion fish > ~/.config/fish/completions/k3d.fish\n\nPowerShell:\n\n\tPS> k3d completion powershell | Out-String | Invoke-Expression\n\n\t# To load completions for every new session, run:\n\tPS> k3d completion powershell > k3d.ps1\n\t# and source this file from your PowerShell profile.\n\n\n```\nk3d completion SHELL\n```\n\n### Options\n\n```\n  -h, --help   help for completion\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n\n","isInternal":false,"tokens":416,"sizeBytes":1482},{"name":"k3d_config_init.md","path":"docs/usage/commands/k3d_config_init.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_config_init.md","title":"Command: /k3d_config_init","category":"command-prompt","format":"markdown","content":"## k3d config init\n\n\n\n```\nk3d config init [flags]\n```\n\n### Options\n\n```\n  -f, --force           Force overwrite of target file\n  -h, --help            help for init\n  -o, --output string   Write a default k3d config (default \"k3d-default.yaml\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n\n","isInternal":false,"tokens":141,"sizeBytes":543},{"name":"k3d_config_migrate.md","path":"docs/usage/commands/k3d_config_migrate.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_config_migrate.md","title":"Command: /k3d_config_migrate","category":"command-prompt","format":"markdown","content":"## k3d config migrate\n\n\n\n```\nk3d config migrate INPUT [OUTPUT] [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for migrate\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n\n","isInternal":false,"tokens":108,"sizeBytes":423},{"name":"k3d_config.md","path":"docs/usage/commands/k3d_config.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_config.md","title":"Command: /k3d_config","category":"command-prompt","format":"markdown","content":"## k3d config\n\nWork with config file(s)\n\n### Synopsis\n\nWork with config file(s)\n\n```\nk3d config [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for config\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d config init](k3d_config_init.md)\t - \n* [k3d config migrate](k3d_config_migrate.md)\t - \n\n","isInternal":false,"tokens":161,"sizeBytes":548},{"name":"k3d_image_import.md","path":"docs/usage/commands/k3d_image_import.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_image_import.md","title":"Command: /k3d_image_import","category":"command-prompt","format":"markdown","content":"## k3d image import\n\nImport image(s) from docker into k3d cluster(s).\n\n### Synopsis\n\nImport image(s) from docker into k3d cluster(s).\n\nIf an IMAGE starts with the prefix 'docker.io/', then this prefix is stripped internally.\nThat is, 'docker.io/k3d-io/k3d-tools:latest' is treated as 'k3d-io/k3d-tools:latest'.\n\nIf an IMAGE starts with the prefix 'library/' (or 'docker.io/library/'), then this prefix is stripped internally.\nThat is, 'library/busybox:latest' (or 'docker.io/library/busybox:latest') are treated as 'busybox:latest'.\n\nIf an IMAGE does not have a version tag, then ':latest' is assumed.\nThat is, 'k3d-io/k3d-tools' is treated as 'k3d-io/k3d-tools:latest'.\n\nA file ARCHIVE always takes precedence.\nSo if a file './k3d-io/k3d-tools' exists, k3d will try to import it instead of the IMAGE of the same name.\n\n```\nk3d image import [IMAGE | ARCHIVE [IMAGE | ARCHIVE...]] [flags]\n```\n\n### Options\n\n```\n  -c, --cluster stringArray   Select clusters to load the image to. (default [k3s-default])\n  -h, --help                  help for import\n  -k, --keep-tarball          Do not delete the tarball containing the saved images from the shared volume\n  -t, --keep-tools            Do not delete the tools node after import\n  -m, --mode string           Which method to use to import images into the cluster [auto, direct, tools]. See https://k3d.io/stable/usage/importing_images/ (default \"tools-node\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d image](k3d_image.md)\t - Handle container images.\n\n","isInternal":false,"tokens":449,"sizeBytes":1703},{"name":"k3d_image.md","path":"docs/usage/commands/k3d_image.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_image.md","title":"Command: /k3d_image","category":"command-prompt","format":"markdown","content":"## k3d image\n\nHandle container images.\n\n### Synopsis\n\nHandle container images.\n\n```\nk3d image [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for image\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d image import](k3d_image_import.md)\t - Import image(s) from docker into k3d cluster(s).\n\n","isInternal":false,"tokens":150,"sizeBytes":545},{"name":"k3d_kubeconfig_get.md","path":"docs/usage/commands/k3d_kubeconfig_get.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_kubeconfig_get.md","title":"Command: /k3d_kubeconfig_get","category":"command-prompt","format":"markdown","content":"## k3d kubeconfig get\n\nPrint kubeconfig(s) from cluster(s).\n\n### Synopsis\n\nPrint kubeconfig(s) from cluster(s).\n\n```\nk3d kubeconfig get [CLUSTER [CLUSTER [...]] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all    Output kubeconfigs from all existing clusters\n  -h, --help   help for get\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n\n","isInternal":false,"tokens":156,"sizeBytes":591},{"name":"k3d_kubeconfig_merge.md","path":"docs/usage/commands/k3d_kubeconfig_merge.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_kubeconfig_merge.md","title":"Command: /k3d_kubeconfig_merge","category":"command-prompt","format":"markdown","content":"## k3d kubeconfig merge\n\nWrite/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n### Synopsis\n\nWrite/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n```\nk3d kubeconfig merge [CLUSTER [CLUSTER [...]] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all                         Get kubeconfigs from all existing clusters\n  -h, --help                        help for merge\n  -d, --kubeconfig-merge-default    Merge into the default kubeconfig ($KUBECONFIG or /home/thklein/.kube/config)\n  -s, --kubeconfig-switch-context   Switch to new context (default true)\n  -o, --output string               Define output [ - | FILE ] (default from $KUBECONFIG or /home/thklein/.kube/config\n      --overwrite                   [Careful!] Overwrite existing file, ignoring its contents\n  -u, --update                      Update conflicting fields in existing kubeconfig (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n\n","isInternal":false,"tokens":292,"sizeBytes":1222},{"name":"k3d_kubeconfig.md","path":"docs/usage/commands/k3d_kubeconfig.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_kubeconfig.md","title":"Command: /k3d_kubeconfig","category":"command-prompt","format":"markdown","content":"## k3d kubeconfig\n\nManage kubeconfig(s)\n\n### Synopsis\n\nManage kubeconfig(s)\n\n```\nk3d kubeconfig [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for kubeconfig\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d kubeconfig get](k3d_kubeconfig_get.md)\t - Print kubeconfig(s) from cluster(s).\n* [k3d kubeconfig merge](k3d_kubeconfig_merge.md)\t - Write/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n","isInternal":false,"tokens":193,"sizeBytes":677},{"name":"k3d_node_create.md","path":"docs/usage/commands/k3d_node_create.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_node_create.md","title":"Command: /k3d_node_create","category":"command-prompt","format":"markdown","content":"## k3d node create\n\nCreate a new k3s node in docker\n\n### Synopsis\n\nCreate a new containerized k3s node (k3s in docker).\n\n```\nk3d node create NAME [flags]\n```\n\n### Options\n\n```\n  -c, --cluster string           Cluster URL or k3d cluster name to connect to. (default \"k3s-default\")\n  -h, --help                     help for create\n  -i, --image string             Specify k3s image used for the node(s) (default: copied from existing node)\n      --k3s-arg stringArray      Additional args passed to k3d command\n      --k3s-node-label strings   Specify k3s node labels in format \"foo=bar\"\n      --memory string            Memory limit imposed on the node [From docker]\n  -n, --network strings          Add node to (another) runtime network\n      --replicas int             Number of replicas of this node specification. (default 1)\n      --role string              Specify node role [server, agent] (default \"agent\")\n      --runtime-label strings    Specify container runtime labels in format \"foo=bar\"\n      --runtime-ulimit strings   Specify container runtime ulimit in format \"ulimit=soft:hard\"\n      --timeout duration         Maximum waiting time for '--wait' before canceling/returning.\n  -t, --token string             Override cluster token (required when connecting to an external cluster)\n      --wait                     Wait for the node(s) to be ready before returning. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","isInternal":false,"tokens":395,"sizeBytes":1679},{"name":"k3d_node_delete.md","path":"docs/usage/commands/k3d_node_delete.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_node_delete.md","title":"Command: /k3d_node_delete","category":"command-prompt","format":"markdown","content":"## k3d node delete\n\nDelete node(s).\n\n### Synopsis\n\nDelete node(s).\n\n```\nk3d node delete (NAME | --all) [flags]\n```\n\n### Options\n\n```\n  -a, --all          Delete all existing nodes\n  -h, --help         help for delete\n  -r, --registries   Also delete registries\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","isInternal":false,"tokens":144,"sizeBytes":545},{"name":"k3d_node_edit.md","path":"docs/usage/commands/k3d_node_edit.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_node_edit.md","title":"Command: /k3d_node_edit","category":"command-prompt","format":"markdown","content":"## k3d node edit\n\n[EXPERIMENTAL] Edit node(s).\n\n### Synopsis\n\n[EXPERIMENTAL] Edit node(s).\n\n```\nk3d node edit NODE [flags]\n```\n\n### Options\n\n```\n  -h, --help                                                               help for edit\n      --port-add [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   [EXPERIMENTAL] (serverlb only!) Map ports from the node container to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                            - Example: `k3d node edit k3d-mycluster-serverlb --port-add 8080:80`\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","isInternal":false,"tokens":217,"sizeBytes":882},{"name":"k3d_node_list.md","path":"docs/usage/commands/k3d_node_list.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_node_list.md","title":"Command: /k3d_node_list","category":"command-prompt","format":"markdown","content":"## k3d node list\n\nList node(s)\n\n### Synopsis\n\nList node(s).\n\n```\nk3d node list [NODE [NODE...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","isInternal":false,"tokens":146,"sizeBytes":545},{"name":"k3d_node_start.md","path":"docs/usage/commands/k3d_node_start.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_node_start.md","title":"Command: /k3d_node_start","category":"command-prompt","format":"markdown","content":"## k3d node start\n\nStart an existing k3d node\n\n### Synopsis\n\nStart an existing k3d node.\n\n```\nk3d node start NODE [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for start\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","isInternal":false,"tokens":122,"sizeBytes":458},{"name":"k3d_node_stop.md","path":"docs/usage/commands/k3d_node_stop.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_node_stop.md","title":"Command: /k3d_node_stop","category":"command-prompt","format":"markdown","content":"## k3d node stop\n\nStop an existing k3d node\n\n### Synopsis\n\nStop an existing k3d node.\n\n```\nk3d node stop NAME [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for stop\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n","isInternal":false,"tokens":122,"sizeBytes":453},{"name":"k3d_node.md","path":"docs/usage/commands/k3d_node.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_node.md","title":"Command: /k3d_node","category":"command-prompt","format":"markdown","content":"## k3d node\n\nManage node(s)\n\n### Synopsis\n\nManage node(s)\n\n```\nk3d node [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for node\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d node create](k3d_node_create.md)\t - Create a new k3s node in docker\n* [k3d node delete](k3d_node_delete.md)\t - Delete node(s).\n* [k3d node edit](k3d_node_edit.md)\t - [EXPERIMENTAL] Edit node(s).\n* [k3d node list](k3d_node_list.md)\t - List node(s)\n* [k3d node start](k3d_node_start.md)\t - Start an existing k3d node\n* [k3d node stop](k3d_node_stop.md)\t - Stop an existing k3d node\n\n","isInternal":false,"tokens":266,"sizeBytes":815},{"name":"k3d_registry_create.md","path":"docs/usage/commands/k3d_registry_create.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_registry_create.md","title":"Command: /k3d_registry_create","category":"command-prompt","format":"markdown","content":"## k3d registry create\n\nCreate a new registry\n\n### Synopsis\n\nCreate a new registry.\n\n```\nk3d registry create NAME [flags]\n```\n\n### Options\n\n```\n      --default-network string    Specify the network connected to the registry (default \"bridge\")\n  -h, --help                      help for create\n  -i, --image string              Specify image used for the registry (default \"docker.io/library/registry:2\")\n      --no-help                   Disable the help text (How-To use the registry)\n  -p, --port [HOST:]HOSTPORT      Select which port the registry should be listening on on your machine (localhost) (Format: [HOST:]HOSTPORT)\n                                   - Example: `k3d registry create --port 0.0.0.0:5111` (default \"random\")\n      --proxy-password string     Specify the password of the proxied remote registry\n      --proxy-remote-url string   Specify the url of the proxied remote registry\n      --proxy-username string     Specify the username of the proxied remote registry\n  -v, --volume [SOURCE:]DEST      Mount volumes into the registry node (Format: [SOURCE:]DEST\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","isInternal":false,"tokens":318,"sizeBytes":1386},{"name":"k3d_registry_delete.md","path":"docs/usage/commands/k3d_registry_delete.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_registry_delete.md","title":"Command: /k3d_registry_delete","category":"command-prompt","format":"markdown","content":"## k3d registry delete\n\nDelete registry/registries.\n\n### Synopsis\n\nDelete registry/registries.\n\n```\nk3d registry delete (NAME | --all) [flags]\n```\n\n### Options\n\n```\n  -a, --all    Delete all existing registries\n  -h, --help   help for delete\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","isInternal":false,"tokens":138,"sizeBytes":546},{"name":"k3d_registry_list.md","path":"docs/usage/commands/k3d_registry_list.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_registry_list.md","title":"Command: /k3d_registry_list","category":"command-prompt","format":"markdown","content":"## k3d registry list\n\nList registries\n\n### Synopsis\n\nList registries.\n\n```\nk3d registry list [NAME [NAME...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n","isInternal":false,"tokens":148,"sizeBytes":579},{"name":"k3d_registry.md","path":"docs/usage/commands/k3d_registry.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_registry.md","title":"Command: /k3d_registry","category":"command-prompt","format":"markdown","content":"## k3d registry\n\nManage registry/registries\n\n### Synopsis\n\nManage registry/registries\n\n```\nk3d registry [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for registry\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d registry create](k3d_registry_create.md)\t - Create a new registry\n* [k3d registry delete](k3d_registry_delete.md)\t - Delete registry/registries.\n* [k3d registry list](k3d_registry_list.md)\t - List registries\n\n","isInternal":false,"tokens":190,"sizeBytes":679},{"name":"k3d_version_list.md","path":"docs/usage/commands/k3d_version_list.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_version_list.md","title":"Command: /k3d_version_list","category":"command-prompt","format":"markdown","content":"## k3d version list\n\nList k3d/K3s versions. Component can be one of 'k3d', 'k3s', 'k3d-proxy', 'k3d-tools'.\n\n```\nk3d version list COMPONENT [flags]\n```\n\n### Options\n\n```\n  -e, --exclude string   Exclude Regexp (default excludes pre-releases, arch-specific tags and digests) (default \"^sha-|.+(rc|engine|dind|alpha|beta|dev|test|arm|arm64|amd64|s390x).*\")\n  -f, --format string    [DEPRECATED] Use --output instead (default \"raw\")\n  -h, --help             help for list\n  -i, --include string   Include Regexp (default includes everything (default \".*\")\n  -l, --limit int        Limit number of tags in output (0 = unlimited)\n  -o, --output string    Output Format [raw | repo] (default \"raw\")\n  -s, --sort string      Sort Mode (asc | desc | off) (default \"desc\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d version](k3d_version.md)\t - Show k3d and default k3s version\n\n","isInternal":false,"tokens":308,"sizeBytes":1072},{"name":"k3d_version.md","path":"docs/usage/commands/k3d_version.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d_version.md","title":"Command: /k3d_version","category":"command-prompt","format":"markdown","content":"## k3d version\n\nShow k3d and default k3s version\n\n### Synopsis\n\nShow k3d and default k3s version\n\n```\nk3d version [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for version\n  -o, --output string   This will return version information as a different format.  Only json is supported\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d version list](k3d_version_list.md)\t - List k3d/K3s versions. Component can be one of 'k3d', 'k3s', 'k3d-proxy', 'k3d-tools'.\n\n","isInternal":false,"tokens":211,"sizeBytes":722},{"name":"k3d.md","path":"docs/usage/commands/k3d.md","rawUrl":"https://raw.githubusercontent.com/k3d-io/k3d/HEAD/docs/usage/commands/k3d.md","title":"Command: /k3d","category":"command-prompt","format":"markdown","content":"## k3d\n\nhttps://k3d.io/ -> Run k3s in Docker!\n\n### Synopsis\n\nhttps://k3d.io/\nk3d is a wrapper CLI that helps you to easily create k3s clusters inside docker.\nNodes of a k3d cluster are docker containers running a k3s image.\nAll Nodes of a k3d cluster are part of the same docker network.\n\n```\nk3d [flags]\n```\n\n### Options\n\n```\n  -h, --help         help for k3d\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n      --version      Show k3d and default k3s version\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n* [k3d completion](k3d_completion.md)\t - Generate completion scripts for [bash, zsh, fish, powershell | psh]\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n* [k3d image](k3d_image.md)\t - Handle container images.\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n* [k3d node](k3d_node.md)\t - Manage node(s)\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n* [k3d version](k3d_version.md)\t - Show k3d and default k3s version\n\n","isInternal":false,"tokens":344,"sizeBytes":1116}],"systemPromptSnippet":"<yakaai_skills repo=\"k3d-io/k3d\">\n<!-- File: CLAUDE.md (Tokens: ~2382 | Category: claude-rule) -->\n# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nk3d creates containerized k3s (lightweight Kubernetes) clusters using Docker. It runs multi-node k3s clusters on a single machine. The Go module is `github.com/k3d-io/k3d/v5`.\n\n## Build & Development Commands\n\n```bash\nmake build              # Build for local platform -> bin/k3d\nmake build-debug        # Build with debug symbols\nmake build-cross        # Cross-compile for all platforms (needs gox)\nmake install-tools      # Install required tools (golangci-lint, gox)\n```\n\nDependencies are vendored (`-mod=vendor`). The go.work workspace includes `.`, `./docgen`, and `./tools`.\n\n### Local Helper Image Overrides\n\nWhen developing helper images locally, use these env vars to point k3d at your local builds instead of the published ones (see `pkg/types/env.go`):\n\n```bash\nK3D_IMAGE_LOADBALANCER=ghcr.io/k3d-io/k3d-proxy:dev   # Override the load balancer (proxy) image\nK3D_IMAGE_TOOLS=ghcr.io/k3d-io/k3d-tools:dev           # Override the tools helper image\n```\n\n## Testing\n\n```bash\nmake test                                           # Run all unit tests\ngo test ./pkg/config/... -run TestProcessConfig     # Run a specific test\nmake e2e                                            # Run E2E tests (requires Docker, uses DIND)\nmake e2e -e E2E_INCLUDE=\"test_basic\"                # Run specific E2E test\nmake e2e -e E2E_LOG_LEVEL=trace -e E2E_FAIL_FAST=true  # E2E with debug output\n```\n\nE2E tests are bash scripts in `tests/` that run inside Docker-in-Docker containers. Unit tests use `testify` for assertions and `go-test/deep` for deep equality. Config test assets are in `pkg/config/test_assets/`.\n\n### E2E Test Framework\n\n**Execution chain:** `make e2e` -> `tests/dind.sh` (builds DIND image, starts privileged container) -> `tests/runner.sh` (discovers and batches tests) -> `test_*.sh` scripts.\n\n**Writing a new E2E test:**\n\n1. Create `tests/test_<name>.sh` (the `test_` prefix is required for auto-discovery)\n2. Make it executable (`chmod +x`)\n3. Follow the standard boilerplate:\n   ```bash\n   #!/bin/bash\n   CURR_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n   [ -d \"$CURR_DIR\" ] || { echo \"FATAL: no current dir (maybe running in zsh?)\"; exit 1; }\n   source \"$CURR_DIR/common.sh\"\n\n   ### Step Setup ###\n   LOG_FILE=\"$TEST_OUTPUT_DIR/$( basename \"${BASH_SOURCE[0]}\" ).log\"\n   exec >${LOG_FILE} 2>&1\n   export LOG_FILE\n   KUBECONFIG=\"$KUBECONFIG_ROOT/$( basename \"${BASH_SOURCE[0]}\" ).yaml\"\n   export KUBECONFIG\n   ### Step Setup ###\n\n   export CURRENT_STAGE=\"Test | <name>\"\n   # ... test logic using $EXE, info, failed, check_clusters, etc.\n   exit 0\n   ```\n4. Use unique cluster/resource names to avoid collisions with parallel tests\n5. Always clean up resources (cluster delete, registry delete) at the end\n\n**Key helpers from `tests/common.sh`:** `info`, `failed`, `passed`, `highlight`, `check_clusters`, `check_multi_node`, `check_registry`, `wait_for_pod_running_by_name`, `wait_for_pod_running_by_label`, `exec_in_node`, `docker_assert_container_label`, `k3s_assert_node_label`.\n\n**E2E environment variables:** `E2E_INCLUDE` (run only named tests), `E2E_EXCLUDE` (skip named tests), `E2E_PARALLEL` (default: 4), `E2E_EXTRA` (run `extra_test_*` files), `E2E_FAIL_FAST`, `E2E_LOG_LEVEL`, `E2E_K3S_VERSION`, `E2E_DIND_VERSION`, `E2E_KEEP` (keep runner container).\n\n## Linting & Formatting\n\n```bash\nmake fmt        # Fix formatting (gofmt)\nmake check-fmt  # Check formatting\nmake lint       # Run golangci-lint (v2.4.0)\nmake ci-lint    # Same with 5-minute timeout (CI)\nmake check      # check-fmt + lint\n```\n\n## Architecture\n\nThree-layer design:\n\n1. **CLI layer** (`cmd/`) - Cobra commands for cluster, node, registry, kubeconfig, image, config, debug subcommands. Entry point: `cmd/root.go` -> `NewCmdK3d()`.\n\n2. **Client layer** (`pkg/client/`) - Business logic and orchestration. Key files: `cluster.go` (ClusterCreate/Start/Delete/Run), `node.go` (NodeCreate/Start/Delete), `registry.go`, `loadbalancer.go`, `kubeconfig.go`.\n\n3. **Runtime layer** (`pkg/runtimes/`) - Container runtime abstraction via the `Runtime` interface in `runtime.go`. Only Docker is implemented (`pkg/runtimes/docker/`). The Docker runtime translates k3d types to Docker API calls (`translate.go`).\n\n### Key Packages\n\n- **`pkg/types/`** - Core domain types: `Cluster`, `Node`, `Registry`, `Role` (ServerRole, AgentRole, LoadBalancerRole, RegistryRole). Extensive label system (`k3d.cluster`, `k3d.role`, etc.) used to track Docker container metadata.\n- **`pkg/config/`** - Versioned config system (current: `v1alpha5`, API version `k3d.io/v1alpha5`). Includes migration (`migrate.go`), JSON schema validation (`schema.json` embedded via `//go:embed`), and config processing/transformation pipeline.\n- **`pkg/actions/`** - Node lifecycle hooks (e.g., `WriteFileAction`).\n- **`pkg/logger/`** - Logging via logrus.\n\n### Helper Components\n\n- **`proxy/`** - nginx-based load balancer with confd for dynamic upstream config. Built as `ghcr.io/k3d-io/k3d-proxy`.\n- **`tools/`** - Separate Go module (`tools/`) for the k3d-tools helper binary. Built as `ghcr.io/k3d-io/k3d-tools`.\n\n## Config System\n\nConfig files are YAML with `apiVersion: k3d.io/v1alpha5` and `kind: Simple`. The processing pipeline: read YAML -> validate JSON schema -> migrate from older versions if needed -> transform to internal types -> merge with defaults. Config versions: v1alpha2 (legacy) -> v1alpha3 -> v1alpha4 -> v1alpha5 (current).\n\n## Version & LDFLAGS\n\nVersion info is injected at build time via LDFLAGS into `version/version.go`:\n- `version.Version` - git tag\n- `version.K3sVersion` - latest stable k3s version (fetched from k3s update channel)\n- `version.HelperVersionOverride` - optional override for helper image versions\n\n## License & Contributing\n\nThis project is **MIT licensed** (Copyright 2019-2023 Thorsten Klein). All new Go source files must include the MIT copyright header present in existing files. See `CONTRIBUTING.md` for guidelines — check existing issues/PRs before opening new ones to avoid duplicates. The project follows the Contributor Covenant Code of Conduct (`CODE_OF_CONDUCT.md`).\n\n## Conventions\n\n- All Go source files have the MIT license copyright header\n- Import alias: `k3d \"github.com/k3d-io/k3d/v5/pkg/types\"` is used throughout as the canonical import for the types package\n- Docker is the only runtime, but all container operations go through the `Runtime` interface\n- Node types are identified by `Role` and tracked via Docker container labels\n\n## Issue & PR Handling\n\n**Before starting work on any issue:**\n\n1. **Check for duplicates** — search open and closed issues for the same topic (`gh issue list -S \"keyword\"` / `gh issue list -S \"keyword\" --state closed`)\n2. **Check for existing PRs** — look for open PRs that already address the issue (`gh pr list -S \"keyword\"`)\n3. **Check if it's a k3d issue** — many reports are actually k3s, Docker, or CNI issues. If so, redirect the reporter to the appropriate upstream repo\n4. **Read the full thread** — issues often evolve through discussion; the original request may have been refined or scoped down\n\n**When replying to issues:**\n\n- For questions: answer concisely, point to env vars/flags/docs, close if resolved\n- For bugs: confirm reproducibility scope, check if already fixed on `main`\n- For features: check if there's a workaround, note if a PR would be welcome\n\n**When working on PRs:**\n\n1. **Check the linked issue** — understand the full context and any decisions made in discussion\n2. **Check the PR's CI status** — don't start reviewing or building on a PR that's failing CI for unrelated reasons\n3. **Check for related/conflicting PRs** — look for other open PRs touching the same files (`gh pr list` + review changed files)\n4. **Verify the branch is up to date** with `main` before investing effort\n\n**Scope awareness:**\n\n- k3d only controls the container orchestration layer around k3s. Issues about k3s behavior, CNI plugins, Kubernetes internals, or Docker engine bugs are upstream concerns\n- The proxy (`k3d-proxy`) and tools (`k3d-tools`) images are part of this project — issues about those are in scope\n- Registry issues may involve the upstream `registry` image vs k3d's registry wiring — distinguish which layer is at fault\n\n## Deep Dive References\n\nFor detailed analysis beyond this summary, see `.planning/codebase/`:\n\n| Document | Contents |\n|----------|----------|\n| `STACK.md` | Full dependency inventory, Go version, build toolchain, Docker SDK usage |\n| `ARCHITECTURE.md` | Layer diagrams, data flow through CLI->Client->Runtime, abstraction boundaries |\n| `STRUCTURE.md` | Complete directory layout, file naming conventions, package organization |\n| `CONVENTIONS.md` | Error handling patterns, logging conventions, code style, naming rules |\n| `TESTING.md` | Unit test patterns, E2E test framework details, test helpers, fixture locations |\n| `INTEGRATIONS.md` | Docker API interaction, k3s channel server, registry (wharfie), kubeconfig handling |\n| `CONCERNS.md` | Technical debt, single-runtime limitation, config migration complexity, known fragile areas |\n\n<!-- File: docs/usage/commands/k3d_cluster_create.md (Tokens: ~1359 | Category: command-prompt) -->\n## k3d cluster create\n\nCreate a new cluster\n\n### Synopsis\n\n\nCreate a new k3s cluster with containerized nodes (k3s in docker).\nEvery cluster will consist of one or more containers:\n\n- 1 (or more) server node container (k3s)\n- (optionally) 1 loadbalancer container as the entrypoint to the cluster (nginx)\n- (optionally) 1 (or more) agent node containers (k3s)\n\n\n```\nk3d cluster create NAME [flags]\n```\n\n### Options\n\n```\n  -a, --agents int                                                     Specify how many agents you want to create\n      --agents-memory string                                           Memory limit imposed on the agents nodes [From docker]\n      --api-port [HOST:]HOSTPORT                                       Specify the Kubernetes API server port exposed on the LoadBalancer (Format: [HOST:]HOSTPORT)\n                                                                        - Example: `k3d cluster create --servers 3 --api-port 0.0.0.0:6550`\n  -c, --config string                                                  Path of a config file to use\n  -e, --env KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]                   Add environment variables to nodes (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -e \"HTTP_PROXY=my.proxy.com@server:0\" -e \"SOME_KEY=SOME_VAL@server:0\"`\n      --gpus string                                                    GPU devices to add to the cluster node containers ('all' to pass all GPUs) [From docker]\n  -h, --help                                                           help for create\n      --host-alias ip:host[,host,...]                                  Add ip:host[,host,...] mappings\n      --host-pid-mode                                                  Enable host pid mode of server(s) and agent(s)\n  -i, --image string                                                   Specify k3s image that you want to use for the nodes\n      --k3s-arg ARG@NODEFILTER[;@NODEFILTER]                           Additional args passed to k3s command (Format: ARG@NODEFILTER[;@NODEFILTER])\n                                                                        - Example: `k3d cluster create --k3s-arg \"--disable=traefik@server:0\"`\n      --k3s-node-label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]        Add label to k3s node (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --k3s-node-label \"my.label@agent:0,1\" --k3s-node-label \"other.label=somevalue@server:0\"`\n      --kubeconfig-switch-context                                      Directly switch the default kubeconfig's current-context to the new cluster's context (requires --kubeconfig-update-default) (default true)\n      --kubeconfig-update-default                                      Directly update the default kubeconfig with the new cluster's context (default true)\n      --lb-config-override strings                                     Use dotted YAML path syntax to override nginx loadbalancer settings\n      --network string                                                 Join an existing network\n      --no-image-volume                                                Disable the creation of a volume for importing images\n      --no-lb                                                          Disable the creation of a LoadBalancer in front of the server nodes\n      --no-rollback                                                    Disable the automatic rollback actions, if anything goes wrong\n  -p, --port [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   Map ports from the node containers (via the serverlb) to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                        - Example: `k3d cluster create --agents 2 -p 8080:80@agent:0 -p 8081@agent:1`\n      --registry-config string                                         Specify path to an extra registries.yaml file\n      --registry-create NAME[:HOST][:HOSTPORT]                         Create a k3d-managed registry and connect it to the cluster (Format: NAME[:HOST][:HOSTPORT]\n                                                                        - Example: `k3d cluster create --registry-create mycluster-registry:0.0.0.0:5432`\n      --registry-use stringArray                                       Connect to one or more k3d-managed registries running locally\n      --runtime-label KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]         Add label to container runtime (Format: KEY[=VALUE][@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-label \"my.label@agent:0,1\" --runtime-label \"other.label=somevalue@server:0\"`\n      --runtime-ulimit NAME[=SOFT]:[HARD]                              Add ulimit to container runtime (Format: NAME[=SOFT]:[HARD]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-ulimit \"nofile=1024:1024\" --runtime-ulimit \"noproc=1024:1024\"`\n  -s, --servers int                                                    Specify how many servers you want to create\n      --servers-memory string                                          Memory limit imposed on the server nodes [From docker]\n      --subnet 172.28.0.0/16                                           [Experimental: IPAM] Define a subnet for the newly created container network (Example: 172.28.0.0/16)\n      --timeout duration                                               Rollback changes if cluster couldn't be created in specified duration.\n      --token string                                                   Specify a cluster token. By default, we generate one.\n  -v, --volume [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]              Mount volumes into the nodes (Format: [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -v /my/path@agent:0,1 -v /tmp/test:/tmp/other@server:0`\n      --wait                                                           Wait for the server(s) to be ready before returning. Use '--timeout DURATION' to not wait forever. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n<!-- File: docs/usage/commands/k3d_cluster_delete.md (Tokens: ~151 | Category: command-prompt) -->\n## k3d cluster delete\n\nDelete cluster(s).\n\n### Synopsis\n\nDelete cluster(s).\n\n```\nk3d cluster delete [NAME [NAME ...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all             Delete all existing clusters\n  -c, --config string   Path of a config file to use\n  -h, --help            help for delete\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n<!-- File: docs/usage/commands/k3d_cluster_edit.md (Tokens: ~219 | Category: command-prompt) -->\n## k3d cluster edit\n\n[EXPERIMENTAL] Edit cluster(s).\n\n### Synopsis\n\n[EXPERIMENTAL] Edit cluster(s).\n\n```\nk3d cluster edit CLUSTER [flags]\n```\n\n### Options\n\n```\n  -h, --help                                                               help for edit\n      --port-add [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   [EXPERIMENTAL] Map ports from the node containers (via the serverlb) to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                            - Example: `k3d node edit k3d-mycluster-serverlb --port-add 8080:80`\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n<!-- File: docs/usage/commands/k3d_cluster_list.md (Tokens: ~157 | Category: command-prompt) -->\n## k3d cluster list\n\nList cluster(s)\n\n### Synopsis\n\nList cluster(s).\n\n```\nk3d cluster list [NAME [NAME...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n      --token           Print k3s cluster token\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n<!-- File: docs/usage/commands/k3d_cluster_start.md (Tokens: ~187 | Category: command-prompt) -->\n## k3d cluster start\n\nStart existing k3d cluster(s)\n\n### Synopsis\n\nStart existing k3d cluster(s)\n\n```\nk3d cluster start [NAME [NAME...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all                Start all existing clusters\n  -h, --help               help for start\n      --timeout duration   Maximum waiting time for '--wait' before canceling/returning.\n      --wait               Wait for the server(s) (and loadbalancer) to be ready before returning. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n<!-- File: docs/usage/commands/k3d_cluster_stop.md (Tokens: ~142 | Category: command-prompt) -->\n## k3d cluster stop\n\nStop existing k3d cluster(s)\n\n### Synopsis\n\nStop existing k3d cluster(s).\n\n```\nk3d cluster stop [NAME [NAME...] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all    Stop all existing clusters\n  -h, --help   help for stop\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d cluster](k3d_cluster.md)\t - Manage cluster(s)\n\n<!-- File: docs/usage/commands/k3d_cluster.md (Tokens: ~261 | Category: command-prompt) -->\n## k3d cluster\n\nManage cluster(s)\n\n### Synopsis\n\nManage cluster(s)\n\n```\nk3d cluster [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for cluster\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d cluster create](k3d_cluster_create.md)\t - Create a new cluster\n* [k3d cluster delete](k3d_cluster_delete.md)\t - Delete cluster(s).\n* [k3d cluster edit](k3d_cluster_edit.md)\t - [EXPERIMENTAL] Edit cluster(s).\n* [k3d cluster list](k3d_cluster_list.md)\t - List cluster(s)\n* [k3d cluster start](k3d_cluster_start.md)\t - Start existing k3d cluster(s)\n* [k3d cluster stop](k3d_cluster_stop.md)\t - Stop existing k3d cluster(s)\n\n<!-- File: docs/usage/commands/k3d_completion.md (Tokens: ~416 | Category: command-prompt) -->\n## k3d completion\n\nGenerate completion scripts for [bash, zsh, fish, powershell | psh]\n\n### Synopsis\n\nTo load completions:\n\nBash:\n\n\t$ source <(k3d completion bash)\n\n\t# To load completions for each session, execute once:\n\t# Linux:\n\t$ k3d completion bash > /etc/bash_completion.d/k3d\n\t# macOS:\n\t$ k3d completion bash > /usr/local/etc/bash_completion.d/k3d\n\nZsh:\n\n\t# If shell completion is not already enabled in your environment,\n\t# you will need to enable it.  You can execute the following once:\n\n\t$ echo \"autoload -U compinit; compinit\" >> ~/.zshrc\n\n\t# To load completions for each session, execute once:\n\t$ k3d completion zsh > \"${fpath[1]}/_k3d\"\n\n\t# You will need to start a new shell for this setup to take effect.\n\nfish:\n\n\t$ k3d completion fish | source\n\n\t# To load completions for each session, execute once:\n\t$ k3d completion fish > ~/.config/fish/completions/k3d.fish\n\nPowerShell:\n\n\tPS> k3d completion powershell | Out-String | Invoke-Expression\n\n\t# To load completions for every new session, run:\n\tPS> k3d completion powershell > k3d.ps1\n\t# and source this file from your PowerShell profile.\n\n\n```\nk3d completion SHELL\n```\n\n### Options\n\n```\n  -h, --help   help for completion\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n\n<!-- File: docs/usage/commands/k3d_config_init.md (Tokens: ~141 | Category: command-prompt) -->\n## k3d config init\n\n\n\n```\nk3d config init [flags]\n```\n\n### Options\n\n```\n  -f, --force           Force overwrite of target file\n  -h, --help            help for init\n  -o, --output string   Write a default k3d config (default \"k3d-default.yaml\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n\n<!-- File: docs/usage/commands/k3d_config_migrate.md (Tokens: ~108 | Category: command-prompt) -->\n## k3d config migrate\n\n\n\n```\nk3d config migrate INPUT [OUTPUT] [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for migrate\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d config](k3d_config.md)\t - Work with config file(s)\n\n<!-- File: docs/usage/commands/k3d_config.md (Tokens: ~161 | Category: command-prompt) -->\n## k3d config\n\nWork with config file(s)\n\n### Synopsis\n\nWork with config file(s)\n\n```\nk3d config [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for config\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d config init](k3d_config_init.md)\t - \n* [k3d config migrate](k3d_config_migrate.md)\t -\n\n<!-- File: docs/usage/commands/k3d_image_import.md (Tokens: ~449 | Category: command-prompt) -->\n## k3d image import\n\nImport image(s) from docker into k3d cluster(s).\n\n### Synopsis\n\nImport image(s) from docker into k3d cluster(s).\n\nIf an IMAGE starts with the prefix 'docker.io/', then this prefix is stripped internally.\nThat is, 'docker.io/k3d-io/k3d-tools:latest' is treated as 'k3d-io/k3d-tools:latest'.\n\nIf an IMAGE starts with the prefix 'library/' (or 'docker.io/library/'), then this prefix is stripped internally.\nThat is, 'library/busybox:latest' (or 'docker.io/library/busybox:latest') are treated as 'busybox:latest'.\n\nIf an IMAGE does not have a version tag, then ':latest' is assumed.\nThat is, 'k3d-io/k3d-tools' is treated as 'k3d-io/k3d-tools:latest'.\n\nA file ARCHIVE always takes precedence.\nSo if a file './k3d-io/k3d-tools' exists, k3d will try to import it instead of the IMAGE of the same name.\n\n```\nk3d image import [IMAGE | ARCHIVE [IMAGE | ARCHIVE...]] [flags]\n```\n\n### Options\n\n```\n  -c, --cluster stringArray   Select clusters to load the image to. (default [k3s-default])\n  -h, --help                  help for import\n  -k, --keep-tarball          Do not delete the tarball containing the saved images from the shared volume\n  -t, --keep-tools            Do not delete the tools node after import\n  -m, --mode string           Which method to use to import images into the cluster [auto, direct, tools]. See https://k3d.io/stable/usage/importing_images/ (default \"tools-node\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d image](k3d_image.md)\t - Handle container images.\n\n<!-- File: docs/usage/commands/k3d_image.md (Tokens: ~150 | Category: command-prompt) -->\n## k3d image\n\nHandle container images.\n\n### Synopsis\n\nHandle container images.\n\n```\nk3d image [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for image\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d image import](k3d_image_import.md)\t - Import image(s) from docker into k3d cluster(s).\n\n<!-- File: docs/usage/commands/k3d_kubeconfig_get.md (Tokens: ~156 | Category: command-prompt) -->\n## k3d kubeconfig get\n\nPrint kubeconfig(s) from cluster(s).\n\n### Synopsis\n\nPrint kubeconfig(s) from cluster(s).\n\n```\nk3d kubeconfig get [CLUSTER [CLUSTER [...]] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all    Output kubeconfigs from all existing clusters\n  -h, --help   help for get\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n\n<!-- File: docs/usage/commands/k3d_kubeconfig_merge.md (Tokens: ~292 | Category: command-prompt) -->\n## k3d kubeconfig merge\n\nWrite/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n### Synopsis\n\nWrite/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n```\nk3d kubeconfig merge [CLUSTER [CLUSTER [...]] | --all] [flags]\n```\n\n### Options\n\n```\n  -a, --all                         Get kubeconfigs from all existing clusters\n  -h, --help                        help for merge\n  -d, --kubeconfig-merge-default    Merge into the default kubeconfig ($KUBECONFIG or /home/thklein/.kube/config)\n  -s, --kubeconfig-switch-context   Switch to new context (default true)\n  -o, --output string               Define output [ - | FILE ] (default from $KUBECONFIG or /home/thklein/.kube/config\n      --overwrite                   [Careful!] Overwrite existing file, ignoring its contents\n  -u, --update                      Update conflicting fields in existing kubeconfig (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d kubeconfig](k3d_kubeconfig.md)\t - Manage kubeconfig(s)\n\n<!-- File: docs/usage/commands/k3d_kubeconfig.md (Tokens: ~193 | Category: command-prompt) -->\n## k3d kubeconfig\n\nManage kubeconfig(s)\n\n### Synopsis\n\nManage kubeconfig(s)\n\n```\nk3d kubeconfig [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for kubeconfig\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d kubeconfig get](k3d_kubeconfig_get.md)\t - Print kubeconfig(s) from cluster(s).\n* [k3d kubeconfig merge](k3d_kubeconfig_merge.md)\t - Write/Merge kubeconfig(s) from cluster(s) into new or existing kubeconfig/file.\n\n<!-- File: docs/usage/commands/k3d_node_create.md (Tokens: ~395 | Category: command-prompt) -->\n## k3d node create\n\nCreate a new k3s node in docker\n\n### Synopsis\n\nCreate a new containerized k3s node (k3s in docker).\n\n```\nk3d node create NAME [flags]\n```\n\n### Options\n\n```\n  -c, --cluster string           Cluster URL or k3d cluster name to connect to. (default \"k3s-default\")\n  -h, --help                     help for create\n  -i, --image string             Specify k3s image used for the node(s) (default: copied from existing node)\n      --k3s-arg stringArray      Additional args passed to k3d command\n      --k3s-node-label strings   Specify k3s node labels in format \"foo=bar\"\n      --memory string            Memory limit imposed on the node [From docker]\n  -n, --network strings          Add node to (another) runtime network\n      --replicas int             Number of replicas of this node specification. (default 1)\n      --role string              Specify node role [server, agent] (default \"agent\")\n      --runtime-label strings    Specify container runtime labels in format \"foo=bar\"\n      --runtime-ulimit strings   Specify container runtime ulimit in format \"ulimit=soft:hard\"\n      --timeout duration         Maximum waiting time for '--wait' before canceling/returning.\n  -t, --token string             Override cluster token (required when connecting to an external cluster)\n      --wait                     Wait for the node(s) to be ready before returning. (default true)\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n<!-- File: docs/usage/commands/k3d_node_delete.md (Tokens: ~144 | Category: command-prompt) -->\n## k3d node delete\n\nDelete node(s).\n\n### Synopsis\n\nDelete node(s).\n\n```\nk3d node delete (NAME | --all) [flags]\n```\n\n### Options\n\n```\n  -a, --all          Delete all existing nodes\n  -h, --help         help for delete\n  -r, --registries   Also delete registries\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n<!-- File: docs/usage/commands/k3d_node_edit.md (Tokens: ~217 | Category: command-prompt) -->\n## k3d node edit\n\n[EXPERIMENTAL] Edit node(s).\n\n### Synopsis\n\n[EXPERIMENTAL] Edit node(s).\n\n```\nk3d node edit NODE [flags]\n```\n\n### Options\n\n```\n  -h, --help                                                               help for edit\n      --port-add [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]   [EXPERIMENTAL] (serverlb only!) Map ports from the node container to the host (Format: [HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER])\n                                                                            - Example: `k3d node edit k3d-mycluster-serverlb --port-add 8080:80`\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n<!-- File: docs/usage/commands/k3d_node_list.md (Tokens: ~146 | Category: command-prompt) -->\n## k3d node list\n\nList node(s)\n\n### Synopsis\n\nList node(s).\n\n```\nk3d node list [NODE [NODE...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n<!-- File: docs/usage/commands/k3d_node_start.md (Tokens: ~122 | Category: command-prompt) -->\n## k3d node start\n\nStart an existing k3d node\n\n### Synopsis\n\nStart an existing k3d node.\n\n```\nk3d node start NODE [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for start\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n<!-- File: docs/usage/commands/k3d_node_stop.md (Tokens: ~122 | Category: command-prompt) -->\n## k3d node stop\n\nStop an existing k3d node\n\n### Synopsis\n\nStop an existing k3d node.\n\n```\nk3d node stop NAME [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for stop\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d node](k3d_node.md)\t - Manage node(s)\n\n<!-- File: docs/usage/commands/k3d_node.md (Tokens: ~266 | Category: command-prompt) -->\n## k3d node\n\nManage node(s)\n\n### Synopsis\n\nManage node(s)\n\n```\nk3d node [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for node\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d node create](k3d_node_create.md)\t - Create a new k3s node in docker\n* [k3d node delete](k3d_node_delete.md)\t - Delete node(s).\n* [k3d node edit](k3d_node_edit.md)\t - [EXPERIMENTAL] Edit node(s).\n* [k3d node list](k3d_node_list.md)\t - List node(s)\n* [k3d node start](k3d_node_start.md)\t - Start an existing k3d node\n* [k3d node stop](k3d_node_stop.md)\t - Stop an existing k3d node\n\n<!-- File: docs/usage/commands/k3d_registry_create.md (Tokens: ~318 | Category: command-prompt) -->\n## k3d registry create\n\nCreate a new registry\n\n### Synopsis\n\nCreate a new registry.\n\n```\nk3d registry create NAME [flags]\n```\n\n### Options\n\n```\n      --default-network string    Specify the network connected to the registry (default \"bridge\")\n  -h, --help                      help for create\n  -i, --image string              Specify image used for the registry (default \"docker.io/library/registry:2\")\n      --no-help                   Disable the help text (How-To use the registry)\n  -p, --port [HOST:]HOSTPORT      Select which port the registry should be listening on on your machine (localhost) (Format: [HOST:]HOSTPORT)\n                                   - Example: `k3d registry create --port 0.0.0.0:5111` (default \"random\")\n      --proxy-password string     Specify the password of the proxied remote registry\n      --proxy-remote-url string   Specify the url of the proxied remote registry\n      --proxy-username string     Specify the username of the proxied remote registry\n  -v, --volume [SOURCE:]DEST      Mount volumes into the registry node (Format: [SOURCE:]DEST\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n<!-- File: docs/usage/commands/k3d_registry_delete.md (Tokens: ~138 | Category: command-prompt) -->\n## k3d registry delete\n\nDelete registry/registries.\n\n### Synopsis\n\nDelete registry/registries.\n\n```\nk3d registry delete (NAME | --all) [flags]\n```\n\n### Options\n\n```\n  -a, --all    Delete all existing registries\n  -h, --help   help for delete\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n<!-- File: docs/usage/commands/k3d_registry_list.md (Tokens: ~148 | Category: command-prompt) -->\n## k3d registry list\n\nList registries\n\n### Synopsis\n\nList registries.\n\n```\nk3d registry list [NAME [NAME...]] [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for list\n      --no-headers      Disable headers\n  -o, --output string   Output format. One of: json|yaml\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d registry](k3d_registry.md)\t - Manage registry/registries\n\n<!-- File: docs/usage/commands/k3d_registry.md (Tokens: ~190 | Category: command-prompt) -->\n## k3d registry\n\nManage registry/registries\n\n### Synopsis\n\nManage registry/registries\n\n```\nk3d registry [flags]\n```\n\n### Options\n\n```\n  -h, --help   help for registry\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d registry create](k3d_registry_create.md)\t - Create a new registry\n* [k3d registry delete](k3d_registry_delete.md)\t - Delete registry/registries.\n* [k3d registry list](k3d_registry_list.md)\t - List registries\n\n<!-- File: docs/usage/commands/k3d_version_list.md (Tokens: ~308 | Category: command-prompt) -->\n## k3d version list\n\nList k3d/K3s versions. Component can be one of 'k3d', 'k3s', 'k3d-proxy', 'k3d-tools'.\n\n```\nk3d version list COMPONENT [flags]\n```\n\n### Options\n\n```\n  -e, --exclude string   Exclude Regexp (default excludes pre-releases, arch-specific tags and digests) (default \"^sha-|.+(rc|engine|dind|alpha|beta|dev|test|arm|arm64|amd64|s390x).*\")\n  -f, --format string    [DEPRECATED] Use --output instead (default \"raw\")\n  -h, --help             help for list\n  -i, --include string   Include Regexp (default includes everything (default \".*\")\n  -l, --limit int        Limit number of tags in output (0 = unlimited)\n  -o, --output string    Output Format [raw | repo] (default \"raw\")\n  -s, --sort string      Sort Mode (asc | desc | off) (default \"desc\")\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d version](k3d_version.md)\t - Show k3d and default k3s version\n\n<!-- File: docs/usage/commands/k3d_version.md (Tokens: ~211 | Category: command-prompt) -->\n## k3d version\n\nShow k3d and default k3s version\n\n### Synopsis\n\nShow k3d and default k3s version\n\n```\nk3d version [flags]\n```\n\n### Options\n\n```\n  -h, --help            help for version\n  -o, --output string   This will return version information as a different format.  Only json is supported\n```\n\n### Options inherited from parent commands\n\n```\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)\n```\n\n### SEE ALSO\n\n* [k3d](k3d.md)\t - https://k3d.io/ -> Run k3s in Docker!\n* [k3d version list](k3d_version_list.md)\t - List k3d/K3s versions. Component can be one of 'k3d', 'k3s', 'k3d-proxy', 'k3d-tools'.\n\n<!-- ... +1 more modular skills available via /api/skills/k3d-io/k3d?path={path} -->\n</yakaai_skills>"}