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

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).

Juju points of variation Notes for the Microsoft AKS cloud
setup (chronological order):
supported versions: TBA
requirements: TBA
definition: Cf. kubeconfig file.
:warning: Starting with Juju 3.0, because of a bug caused by the fact that the juju client snap is strictly confined but the GKE 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.
- name: user-defined
- type: k8s
- authentication types: [oauth2, clientcertificate, userpass]
- regions: [TO BE ADDED]
- cloud-specific model configuration keys: operator-storage (string) Sets the storage class used to provision operator storage.

workload-storage (string) Sets the preferred storage class used to provision the workload storage.

definition: Cf. kubeconfig file.
notes on bootstrap:
other (alphabetical order:)
CONSTRAINT Not applicable.
<machine> TBA
subnet=... :x:
system-id=... :x:
zone=... TBA
RESOURCE (cloud)

Consistent naming, tagging, and the ability to add user-controlled tags to created instances.


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.