Vanilla Installation

Deploy kubeflow into an AKS cluster using default settings.

Background

In this lab, you will use the Azure CLI to deploy an Azure Kubernetes Service (AKS) Automatic cluster. AKS Automatic offers a simplified, managed Kubernetes experience with automated node management, scaling, and security configurations. For more details, see the AKS Automatic documentation. Note that AKS Automatic is currently in preview, while it provides faster setup and less manual configuration, it is not recommended for production use. For production workloads or when advanced features and customization are required, use regular AKS instead. You will then install Kubeflow using the default settings using Kustomize and create a jupyter notebook server you can easily access on your browser.

You can follow these same instructions to deploy Kubeflow on a non-automatic AKS cluster.

Instructions for Basic Deployment without TLS and with Default Password

This deployment option is for testing only. To deploy with TLS, and change default password, please click here: Deploy kubeflow with TLS.

Deploy AKS Automatic

Use the Azure CLI to deploy an AKS Automatic cluster.

For detailed instructions on installing AKS Automatic, please refer to the AKS Automatic installation documentation.

Login to the Azure CLI.

az login

Set up your environment variables

RGNAME=kubeflow
CLUSTERNAME=kubeflow-aks-automatic
LOCATION=eastus

Create the resource group

az group create -n $RGNAME -l $LOCATION

Add or Update AKS extension

az extension add --name aks-preview

This article requires the aks-preview Azure CLI extension version 9.0.0b4 or later.

Create an AKS Automatic cluster

az aks create \
    --resource-group $RGNAME \
    --name $CLUSTERNAME \
    --location $LOCATION \
    --sku automatic \
    --generate-ssh-keys 

Connect to AKS Automatic Cluster

Install kubectl using the Azure CLI, if required.

az aks install-cli

Get the credentials for your AKS cluster

az aks get-credentials --resource-group $RGNAME --name $CLUSTERNAME

Verify connectivity to the cluster. This should return a list of nodes.

kubectl get nodes

Deploy KubeFlow

Clone this repo which includes the kubeflow/manifests repo as Git Submodules

git clone --recurse-submodules https://github.com/Azure/kubeflow-aks.git

Change directory into the newly cloned directory

cd kubeflow-aks

Install kustomize

Install kustomize using the installation script:

curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
sudo mv ./kustomize /usr/local/bin/kustomize

Verify the installation:

kustomize version

Run Kubeflow Kustomize deployment

This deployment option is for testing only. To deploy with TLS, and change default password, please click here: Deploy kubeflow with TLS.

From the root of the repo, cd into kubeflow’s manifests directory and make sure you are in the v1.10-branch.

cd manifests/
git checkout v1.10-branch
cd ..

Install all of the components via a single command

cp -a deployments/vanilla manifests/vanilla
cd manifests/  
while ! kustomize build vanilla | kubectl apply --server-side=true -f -; do echo "Retrying to apply resources"; sleep 10; done

Once the command has completed, check the pods are ready

kubectl get pods -n cert-manager
kubectl get pods -n istio-system
kubectl get pods -n auth
kubectl get pods -n knative-eventing
kubectl get pods -n knative-serving
kubectl get pods -n kubeflow
kubectl get pods -n kubeflow-user-example-com

Access the Kubeflow dashboard

Run kubectl port-forward to access the Kubeflow dashboard

kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80

Finally, open http://localhost:8080 and login with the default user’s credentials. The default email address is user@example.com and the default password is 12341234

Testing the deployment with a Notebook server

You can test that the deployments worked by creating a new Notebook server using the GUI.

  1. Click on “Create a new Notebook” creating a new Notebook server

  2. Click on “+ New Notebook” in the top right corner of the resulting page

  3. Enter a name for the server

  4. Leave the “jupyterlab” option selected

  5. Feel free to pick one of the images available, in this case we choose the default

  6. Set Requested CPU to 0.5 and requested memory in Gi to 1

  7. Under Data Volumes click on “+ Add new volume”

  8. Expand the resulting section

  9. Set the name to datavol-1. The default name provided would not work because it has characters that are not allowed

  10. Set the size in Gi to 1

  11. Uncheck “Use default class”

  12. Choose a class from the provided options. In this case I will choose azurefile-premium

  13. Choose ReadWriteMany as the Access mode. Your data volume config should look like the picture below data volume config

  14. Click on “Launch” at the bottom of the page. A successful deployment should have a green checkmark under status, after 1-2 minutes. deployment successful

  15. Click on “Connect” to access your jupyter lab

  16. Under Notebook, click on Python 3 to access your jupyter notebook and start coding

Next steps

[Secure your kubeflow cluster using TLS and stronger Password] deployment option.