Skip to content

Add environment variable information to CLI help and/or introduce kind env command #4044

@jaehanbyun

Description

@jaehanbyun

What would you like to be added:
Add environment variable information to Kind CLI help output and/or introduce a new kind env command to display currently set environment variables (e.g., KIND_EXPERIMENTAL_PROVIDER, KUBECONFIG) and list available configurable environment variables.

Why is this needed:
When attempting to use Kind with Podman instead of Docker, users may encounter errors like:

ERROR: failed to list clusters: command "docker ps -a --filter label=io.x-k8s.kind.cluster --format '{{.Label "io.x-k8s.kind.cluster"}}'" failed with error: exit status 1
Command Output: Cannot connect to the Docker daemon at unix:///Users/byeonjaehan/.docker/run/docker.sock. Is the docker daemon running?

However, when checking kind --help, there is no information about the KIND_EXPERIMENTAL_PROVIDER environment variable or other configurable environment variables. This makes it difficult for users to discover how to configure Kind to use alternative container runtimes or other settings.

Proposed Solution:

  1. Add a brief section to kind --help output that mentions key environment variables like KIND_EXPERIMENTAL_PROVIDER, KIND_CLUSTER_NAME, and KUBECONFIG.

  2. Introduce a new kind env command that:

    • Displays currently set Kind-related environment variables and their values
    • Lists all available Kind environment variables with brief descriptions
    • Optionally allows setting/unsetting environment variables (similar to go env)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions