Skip to content

How to disable import of default ~/.kube/config? #185

@rbq

Description

@rbq

I set up the following config store, which correctly adds the respective files to kubeswitch:

- kind: filesystem
  kubeconfigName: "kubeconfig.yaml"
  paths:
  - ~/Development/Terraform/

But despite this being the only config store in there, I'm still getting all contexts found in ~/.kube/config added to the the list (without any directory prefix).

The unwanted contexts appear in ~/.kube/switch-state/switch.filesystem.env-and-flag.index. I'm not passing any flags, so I assume kubeswitch is implicitly importing additional contexts based on kubectl env variables, or shell history, or …? Can't find anything regarding this behaviour and how to disable it in the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions