mnubo / kubernetes-py

A python module for Kubernetes.
Apache License 2.0
123 stars 46 forks source link

adding user option in the K8sConfig #127

Closed qubusp closed 6 years ago

qubusp commented 6 years ago
namespace='xyz',
user='zyx'
)

Sometimes it happens that there are multiple users on the same context f. ex. on runners and ci tools

sebastienc commented 6 years ago

You can use the parameter auth for this:

:param auth: A tuple of (username, password) for basic authentication.

or use a token instead:

:param token: An authentication token. Mutually exclusive with 'auth'.

But in any case I think a context should have only one user configured for it. You can have multiple contexts but there's only one active context.

https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/