Juju 2.9 - Bootstrapping on K8s

Hello everyone,

Folks at the Juju team are working hard to get version 2.9 released. This version aims to improve the bootstrapping experience on Kubernetes.

We honestly appreciate all the feedback we’ve got so far. Juju aims to make it simpler for anyone to run production apps on K8s, so making the bootstrapping experience reliable and consistent is key.

The current candidate is looking good and has been tested by teams internally. It has not been released for production yet, so this is the moment to get as much feedback as possible - specially in firewall-protected-custom-everything kind of environments!

To install Juju 2.9 candidate:

snap install juju --classic --channel=2.9/candidate

There are K8s specific guides on bootstrapping in the documentation:

Feel free to share your error (or success!) messages here and reach out if you have any questions about the bootstrapping process!

2 Likes

I am running everything from a fresh Ubuntu 20.04 VM so my issues might be a bit different when it comes to creating the cluster. I find it still valid to describe it here if someone is interested to test on different K8s. The bootstrapping process itself should be the same.

On all the K8s below, I am already able to interact with my cluster via kubectl.

Minikube :white_check_mark:

Creating Cluster

minikube start --memory 4096 will return an error on a fresh VM. This is because the VM doesn’t have a driver (or you haven’t specified --vm-driver=none).

I installed Docker and although I could run Docker commands, Minikube would still not detect the Docker driver. That is because the Docker daemon binds to a Unix socket owned by root. If you want other users to have access to it, create a group called docker and add your user to it. More details can be found here.

There’s an argument for using the --vm-driver=none flag when running on a VM, but that will depend on your deployment.

Bootstrapping

Registering:

juju add-k8s my-minikube

Bootstrapping:

juju bootstrap my-minikube

Which returns:

Bootstrap complete, controller "my-minikube" is now available in namespace "controller-my-minikube"
2 Likes

Kind :white_check_mark:

Creating Cluster

Installation

kind create cluster

Bootstrapping

Registering:

juju add-k8s my-kind

Bootstrapping:

juju bootstrap my-kind

Which returns:

Bootstrap complete, controller "my-kind" is now available in namespace "controller-my-kind"
2 Likes

Thanks for tackling this Pedro. Just want to second the call for testing - the more different flavors of K8s we test now, the more people will be up and running with 2.9. Thank you!

2 Likes

Azure Kubernetes Service :white_check_mark:

This assumes that you already have access to a Microsoft Azure subscription and that the Azure CLI is installed on your platform.

Login to the Azure CLI

# login using browser window
az login
# confirm correct subscription in use!
az account show

Create Azure resources

# create resource group
az group create -l uksouth -n juju-test
# create an AKS cluster
az aks create -g juju-test -n juju-cluster --generate-ssh-keys
# setup kubectl to access the cluster
az aks get-credentials -g juju-test -n juju-cluster

Add AKS cluster to Juju

juju add-k8s --aks --resource-group juju-test --cluster-name juju-cluster juju-azure

Bootstrap cluster

juju bootstrap juju-azure

Returning:

Bootstrap complete, controller "juju-azure-uksouth" is now available in namespace "controller-juju-azure-uksouth"
1 Like

Google Kubernetes Engine (GKE) :white_check_mark:

Creating Cluster

When creating the default node pool, ensure that you request a machine type that provides at least 6 GB memory. This provides sufficient resources to enable Juju to be deployed alongside your workloads. The default guided install on the GKE console for ‘my-first-cluster’ does not provide sufficient RAM unless you edit it.

:warning: Run gcloud auth login before gcloud container clusters get-credentials

Bootstrapping

Registering:

juju add-k8s --gke gke-juju

Bootstrapping:

juju bootstrap gke-juju

Which returns:

Bootstrap complete, controller "gke-juju-europe-west1" is now available in namespace "controller-gke-juju-europe-west1"
1 Like

Amazon Elastic Kubernetes Service :white_check_mark:

This assumes that you already have access to an AWS IAM account, and that the AWS CLI is installed alongside eksctl (installation) on your platform.

Login to the AWS CLI

# login using IAM Access Key ID/Secret
aws configure

Create AWS resources

# create a cluster
eksctl create cluster --name juju-test --node-ami-family='Ubuntu2004' --node-type='m5.large'
# confirm access with kubectl
kubectl get nodes

Add EKS cluster to Juju

juju add-k8s juju-eks

Bootstrap cluster

juju bootstrap juju-eks

Returning:

Bootstrap complete, controller "juju-eks" is now available in namespace "controller-juju-eks"
1 Like

Hi @jnsgruk Congratulations on this topic. I have two questions, and I’d appreciate it if you could get back to me: First, is it already possible, or does image 2204 already exist in AWS? And I could then replace:

–node-ami-family=‘Ubuntu2004’

for

–node-ami-family=‘Ubuntu2204’

Second, if it’s not available yet, would it be possible to upgrade this version 20.04 to 22.04 and so on? Thanks.

I’m not sure if the 22.04 images are up yet - @hmlanigan / @wallyworld / @manadart might be able to answer there :slight_smile:

1 Like

I see a patch just landed to make Juju 3.0 default to 22.04 (Jammy).

It is my assumption that these are available.

1 Like