Skip to content

Instantly share code, notes, and snippets.

@Smarker
Last active January 8, 2018 18:25
Show Gist options
  • Save Smarker/c1b6ff6f958f388150146ec0d2ee867b to your computer and use it in GitHub Desktop.
Save Smarker/c1b6ff6f958f388150146ec0d2ee867b to your computer and use it in GitHub Desktop.
set up dask with aks using wsl

List all azure subscriptions

az account list

Switch to a subscription

az account set -s "subscription name"

Show current subscription you are in

az account show

Create a public and private key

ssh-keygen -t rsa -b 4096

Create a resource group

az group create --name myK8sCluster --location eastus

Create the AKS cluster

az aks create \
--resource-group myK8sCluster \ 
--name myK8sCluster \
--node-vm-size Standard_DS3_v2 \
--node-count 3 \ 
--ssh-key-value ~/.ssh/id_rsa.pub -k 1.8.1

Manage a Kubernetes cluster with kubectl

az aks install-cli

Configure kubectl to connect to AKS cluster

az aks get-credentials --resource-group myResourceGroup --name myK8sCluster

Verify connection to cluster

kubectl get nodes

Look at the pods and make sure they are Running. Sometimes it takes at least 30 minutes for kube-svc-redirect pods to go from CrashLoopBackOff to the Running state.

kubectl -n kube-system get po

View Kubernetes web ui

az aks browse --resource-group myResourceGroup --name myK8SCluster

View ui at localhost:8001

Get helm

curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash

Initialize helm

helm init

Install Dask Distributed Helm Chart

helm install stable/dask-distributed --version 2.0.0

You can view your notebook (default password is dask) and bokeh and find their external ip's under services

kubectl get service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment