Skip to content

Find all kubeconfig files available #4245

@phk-nord

Description

@phk-nord

I use a shell variables to read all yaml in a directory and use kubectx and kubens to switch contexts.

# loads all yaml files in a dir 'config.d' to be used as kubeconfigs
export KUBECONFIG=$(ls -1 ~/.kube/config.d/*.yaml | tr "\n" ":")

# refreshes configs available to kubectl
alias rekube='export KUBECONFIG=$(ls -1 ~/.kube/config.d/*.yaml | tr "\n" ":")'

This usually just works with any application but monokle does have issues and is reading multiple files at once.

Screenshot 2024-09-05 at 19 02 44

Not sure if #3312 could be count as related but it's certainly also about kubeconfig configurations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No Status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions