Skip to content
This repository was archived by the owner on Dec 1, 2018. It is now read-only.
This repository was archived by the owner on Dec 1, 2018. It is now read-only.

Add KubeConfig.from_env_var or similar #139

Description

@exarkun

kubectl respects KUBECONFIG for its configuration file location. In addition to the obvious, it also supports multiple configuration files in this variable and merges them.

See https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable for details

It would be great to have a simple API for creating a KubeConfig obeying this convention. For example:

KubeConfig.from_kubeconfig_env(os.environ['KUBECONFIG'])

which might be a building block of a future API like:

KubeConfig.from_convention(os.environ)

(which would look for KUBECONFIG in the given environ dict and then fall back to $HOME/.kube/config if the var is not present)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions