Vanilla Installation
Categories:
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.
💡Note: In order to complete this deployment, you will need to have either following permissions on Resource Group:
- Microsoft.Authorization/policyAssignments/write
- Microsoft.Authorization/policyAssignments/read.
For detailed instructions on installing AKS Automatic, please refer to the AKS Automatic installation documentation.
Login to the Azure CLI.
az login
az account set --subscription <NAME_OR_ID_OF_SUBSCRIPTION>
.
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
💡Note: AKS Automatic is in Preview and requires feature to be registered in subscription.
az feature register --namespace Microsoft.ContainerService --name AutomaticSKUPreview
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
--recurse-submodules
flag helps to get manifests from git submodule linked to this repo
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
--server-side=true
flag helps with large CRDs that may exceed annotation size limits. The retry loop handles dependency ordering issues during installation.
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.
-
Click on “Create a new Notebook”
-
Click on “+ New Notebook” in the top right corner of the resulting page
-
Enter a name for the server
-
Leave the “jupyterlab” option selected
-
Feel free to pick one of the images available, in this case we choose the default
-
Set Requested CPU to 0.5 and requested memory in Gi to 1
-
Under Data Volumes click on “+ Add new volume”
-
Expand the resulting section
-
Set the name to datavol-1. The default name provided would not work because it has characters that are not allowed
-
Set the size in Gi to 1
-
Uncheck “Use default class”
-
Choose a class from the provided options. In this case I will choose
azurefile-premium
-
Choose ReadWriteMany as the Access mode. Your data volume config should look like the picture below
-
Click on “Launch” at the bottom of the page. A successful deployment should have a green checkmark under status, after 1-2 minutes.
-
Click on “Connect” to access your jupyter lab
-
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.