Juju models Kubernetes clusters as clouds The Kubernetes cloud definition contains the IP endpoint address of the master node and the CA cert necessary to establish a secure connection.
Credentials work the same way as for other clouds like AWS etc. User credentials can be added to Juju using:
If you use the
add-k8s command to import an existing Kubernetes cluster into Juju, the credential is added automatically. The standard ~/.kube/config file is used.
It’s also possible to run
add-k8s again to import a different ~/.kube/config file into Juju to set up a totally different Kubernetes cluster as a new Juju cloud. The
KUBECONFIG env var is useful here as it will be honoured by Juju when finding the kube config file to load.