The Microsoft AKS cloud and Juju

List of supported clouds > Microsoft AKS

This document describes details specific to using your existing Microsoft AKS cloud with Juju.

See more: Microsoft AKS

When using the Microsoft AKS cloud with Juju, it is important to keep in mind that it is a (1) Kubernetes cloud and (2) not some other cloud.

See more: Cloud differences in Juju, Kubernetes clouds and Juju

As the differences related to (1) are already documented generically in our Tutorial, How-to guides, and Reference docs, here we record just those that follow from (2).

Notes on add-k8s

Starting with Juju 3.0, because of the fact that the juju client snap is strictly confined but the AKS cloud CLI snap is not, you must run the add-k8s command with the ‘raw’ client. See note in How to add a Kubernetes cloud.

All of the stuff related on how to create a kubernetes cluster, could be just a link to azure documentation, similarly what we do in the GKE documentation; i.e. we can leave in the installation of the cli tools and then directly start with “Set up Juju within the cluster” chapter.

It seems command

juju add-k8s --aks --resource-group <resource-group> --cluster-name <k8s-cluster> <cloud>

Is much more verbose than the analogues for gke - juju add-k8s --gke. Although command itself could be partly removed in the future and made to be automatic (since Thomas is working on it).

Also have a different output then expected -

This operation can be applied to both a copy on this client and to the one on a controller.
Do you want to add k8s cloud aks to:
    1. client only (--client)
    2. controller "for-juju" only (--controller for-juju)
    3. both (--client --controller for-juju)
Enter your choice, or type Q|q to quit: 

It would also be cool to add links (at least) on how all of these things we just created - cloud, k8s, credentials and etc; could be removed

Thanks, I think that’s probably the best way to go too. I’ll look into doing this systematically for all the cloud-specific posts. Then we could cover explicitly just the part about connecting to Juju.

This produces an error:

ERROR   No recommended storage configuration is defined on this cluster.
        Run add-k8s again with --storage=<name> and Juju will use the
        specified storage class or create a storage-class using the recommended
        "Azure Disk" provisioner.

@tmihoc we need to add details on creating storage or letting juju do it for you. Letting juju do it for you is easy, add --storage=<name of new storage> to the bootstrap line. Not sure how to create storage in azure for the other case.

This doc page is hard to read and not that helpful. Most of the configuration options are “TBA” and there is not a single example on how to bootstrap a juju controller on AKS. I see the comments here suggest using “juju add-k8s --aks”, but other docs such as this one https://charmed-kubeflow.io/docs/deploy-charmed-kubeflow-to-aks point to “juju add-k8s aks --client” without the dashes… which one is it ?

Thanks for raising this! In Juju all Kubernetes clouds are fundamentally the same. I’ve updated this doc to point to the doc giving the general notes (Kubernetes clouds and Juju) and left here only the info specific to AKS.

PS Kubernetes clouds and Juju also has some gaps around constraints and placement directives. I’ll fix them asap.