Using Juju with Minikube

Out of the box, Juju can bootstrap to several flavours of Kubernetes, including:

  • microk8s
  • AKS
  • EKS
  • GKE
  • Charmed Kubernetes deployed to AWS, GCE, Azure, MAAS etc

A key requirement is that the cluster is able to provision services such that external ingress is possible. This is necessary to allow the Juju client to access the controller service. The current recommended setup is to use a load balancer service. We’re actively looking at improving how Juju is able to automate the setup needed to work with clusters other than those listed above.

Here’s how to get Juju working with Minikube. Minikube does have a load balancer, but there’s one additional step needed to use it. Before bootstrapping, in a separate terminal, run:

minikube tunnel

Then you can bootstrap as follows:

$ minikube start
$ juju add-k8s minikube
$ juju bootstrap --config controller-service-type=loadbalancer minikube test
Creating Juju controller "test" on minikube
Fetching Juju Dashboard 0.3.0
Creating k8s resources for controller "controller-test"
Starting controller pod
Bootstrap agent now started
Contacting Juju controller at 10.110.112.9 to verify accessibility...

Bootstrap complete, controller "test" is now available in namespace "controller-test"

Now you can run
    juju add-model <model-name>
to create a new model to deploy k8s workloads.

For clusters other than Minikube, there’s additional bootstrap options documented here:

https://juju.is/docs/kubernetes

3 Likes

Thanks for the writeup, and for the docs update :slight_smile: