Installing Pangeo on Azure

This guide takes you through the steps necessary to install Pangeo on Microsoft’s Azure Cloud Platform. We’ll make use of Azure’s Kubernetes as a Service offering, called AKS (Azure Kubernetes Service), for installing Pangeo on Azure. Documentation on AKS can be found here:


This guide lays out only the fundamental steps required to install Pangeo on Azure AKS. Further work, for example to secure your cluster, is highly advised but not directly covered here.

Step One: Build Kubernetes service

The first step to installing Pangeo on Azure is to set up a Kubernetes service that can be used to run Pangeo. This can be done either by using the web interface or by using the Azure commandline interface (CLI). These are both practical options, so we’ll cover each one in turn.

Using the web interface

To use the Azure web interface you must first have a Microsoft account that you can use to log into the Azure web interface. If you have an existing Microsoft account (for example, a or email address) then you can use that, or you can create a new account.

Once you have logged into the Azure web interface, navigate to Kubernetes services and click the blue Add logo in the top left. This will display the Create Kubernetes cluster wizard.

Work through the wizard customising the Kubernetes service to be created as you see necessary (all defaults are reasonable, so you should only need to edit the name of the Kubernetes service to be created). In the last step before the cluster is created a validation process is run, ensuring that any customizations you have made will produce a working cluster. At this step you can also download a template file to make reproducing or automating cluster creation simpler in the future.


One benefit of the web interface is that we can easily create an AKS resource that implements autoscaling via virtual nodes (see for further details on this concept). Virtual nodes are still a preview feature in Azure, so some limitations currently apply. To enable virtual nodes you need to have followed the setup steps in the link above and also be using an Azure region where nodes are supported.

With both of these requirements met, you can enable virtual nodes for autoscaling your Kubernetes service. In the Scale tab, ensure that both the Virtual Nodes and VM scale sets selectors are set to ‘Enabled’.


You cannot create a Kubernetes service with traditional cluster autoscaling using the web interface. See the next section for details on using the Azure CLI to create a Kubernetes service with tradtional cluster autoscaling.

Using the Azure CLI

Instructions for downloading and installing the Azure CLI on major Operating Systems can be found at: All interactions with the Azure CLI are via the az command.

To create a basic Kubernetes service using the Azure CLI:

az aks create \
  --resource-group $RESOURCE_GROUP_NAME \
  --kubernetes-version 1.12.6 \
  --node-count 1 \
  --node-vm-size Standard_B8ms

You’ll need to specify a name for your Kubernetes service (as $AKS_RESOURCE_NAME) and a name for an (existing) resource group (as $RESOURCE_GROUP_NAME). Note that here we’ve also asked for a medium-sized VM (that is, Standard_B8ms) to host the node rather than the default. We found that the default node was too small to host all the pods necessary for the basic Pangeo install created by following this guide. You can, however, specify any VM size name listed in the links from this page as the value to this key:


RBAC (Role-Based Access Control) is enabled by default on Kubernetes services set up using the Azure CLI. If you need to change this default behaviour, you can specify the --disable-rbac flag when creating your Kubernetes cluster.

The az aks create command above assumes that you have already set up a resource group to deploy your Kubernetes service into. If you have not already set up a resource group, run this command before creating your Kubernetes service:

az group create \
  --location $RESOURCE_REGION \

The location of the resource group needs to be specified as a single word programmatic name for an Azure region. A list of available locations can be found by running the following:

az account list-locations | grep name


To create a Kubernetes service with autoscaling enabled you can add extra keys to the previous az aks create command:

az aks create \
  --resource-group $RESOURCE_GROUP_NAME \
  --kubernetes-version 1.12.6 \
  --node-count 1 \
  --node-vm-size Standard_B8ms \
  --enable-vmss \
  --enable-cluster-autoscaler \
  --min-count 1 \
  --max-count 10

You can also update an existing Kubernetes service to add autoscaling:

az aks update \
--resource-group $RESOURCE_GROUP_NAME \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 3

More information on autoscaling with Azure AKS is available here:

Step Two: Customise cluster

With a working Kubernetes service now built we can customise it in readiness for installing Pangeo on the cluster. At its most basic, this means installing helm and tiller, but other customisations (such as authentication) can also be added at this stage. The customisations need to be performed using the Azure CLI. If you don’t have the Azure CLI available, you can either:

  • follow the steps at the link above to install the Azure CLI locally, or

  • use the cloud shell built into the web interface (click the >_ logo at the right of the blue bar at the top of the web interface). The cloud shell includes the Azure CLI and a basic implementation of Visual Studio Code editor.

Kubernetes credentials

Before we can progress we need to acquire kubernetes credentials for our newly-created AKS resource:

az aks get-credentials -g $RESOURCE_GROUP_NAME -n $AKS_RESOURCE_NAME --overwrite-existing

You will need to provide the name of the AKS resource that you just created (as $AKS_RESOURCE_NAME) and the group within which the resource was created (as $RESOURCE_GROUP_NAME).

Helm and tiller

Installing helm and tiller allows us to customise our Kubernetes service by applying helm charts to it. We need to ensure that helm and tiller will work correctly with RBAC, which is enabled by default on Azure Kubernetes services.

kubectl apply -f helm_rbac.yaml
helm init --upgrade --service-account tiller --wait

The contents of helm_rbac.yaml are as follows:

apiVersion: v1
kind: ServiceAccount
  name: tiller
  namespace: kube-system
kind: ClusterRoleBinding
  name: tiller
  kind: ClusterRole
  name: cluster-admin
  - kind: ServiceAccount
    name: tiller
    namespace: kube-system

Step 3: Install Pangeo

Now we can move onto installing Pangeo on our Kubernetes service. This can be done as follows:

helm repo add pangeo
helm repo update
helm upgrade --install --namespace pangeo pangeo pangeo/pangeo -f pangeo.yaml

The helm chart pangeo.yaml is the Pangeo helm chart. The customizations we made to it are documented in the Zero to Jupyterhub guide.

Test install

To test that Pangeo has installed successfully on your Kubernetes service, find the IP address of the Pangeo proxy:

kubectl get service proxy-public --namespace=pangeo

Note that this service can take a long time to start up, so you may need to wait a while for the IP address of the Pangeo proxy to be displayed. The output of the above command will read <pending> while the service is starting up.

Once the service has started up, navigate to the EXTERNAL-IP address listed in the output of the above command in your web browser. If JupyterHub loads then you have successfully installed Pangeo on your Azure Kubernetes service!


If you set up your autoscaling Kubernetes service using the cluster autoscaler then autoscaling should work with no further customisation neeeded. If instead you set up autoscaling using virtual nodes and VM scale sets then a little more work is needed. In particular we need to modify the Pangeo worker-template.yaml file to add two more key groups to the spec section of the yaml:

nodeSelector: agent linux
  type: virtual-kubelet
- key:
  operator: Exists
- key:
  effect: NoSchedule