Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

kim with colon separated KUBECONFIG env var #81

@himslm01

Description

@himslm01

As documented here:

https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable

My KUBECONFIG env var points to three files, like this:

$ echo $KUBECONFIG
/Users/mdsh/.kube/config:/Users/mdsh/.kube/config.d/home/config:/Users/mdsh/.kube/config.d/work/config 

This works as expected with kubectl but kim fail, like this:

$ kim image ls
Error: stat /Users/mdsh/.kube/config:/Users/mdsh/.kube/config.d/home/config:/Users/mdsh/.kube/config.d/work/config: no such file or directory
Usage:
  kim image ls [OPTIONS] [REPOSITORY[:TAG]]

Aliases:
  ls, list

Flags:
  -a, --all        Show all images (default hides tag-less images)
      --digests    Show digests
  -h, --help       help for ls
      --no-trunc   Don't truncate output
  -q, --quiet      Only show image IDs

Global Flags:
  -x, --context string      kubeconfig context for authentication
      --debug               
      --debug-level int     
  -k, --kubeconfig string   kubeconfig for authentication
  -n, --namespace string    namespace (default "kube-image")

FATA[0000] stat /Users/mdsh/.kube/config:/Users/mdsh/.kube/config.d/home/config:/Users/mdsh/.kube/config.d/work/config: no such file or directory 

I have to use the -k parameter to point to a specific config file - which is less than ideal.

$ kim image ls -k /Users/mdsh/.kube/config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions