페이지

2022년 2월 25일 금요일

Installing Kubeflow on Azure

 Azure is Microsoft Corporation's cloud offering, and like AWS and GCP, we can use it to install Kubeflow leveraging a Kubernetes control plane and computing resources residing in the Azure cloud.

1. Register an account on Azure

Sign up at https://azure.microsoft.com - a free tier is available for experimentaion.

2. Install the Azure command-line utilities

See instructions for installation on your platform at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest. You can verify your installation by running the following on the command line on your machine:

az

This should print a list of commands that you can use on the console. To start.log in your account with:

az login

And enter the account credentials you registered in Step 1. You will be redirected to a browser to verify your account, after which you should see a response like the following:

"You have logged in. Now let us find all the subscription to which you have access": -

[

{

    "cloudName": ...

    "id"...,

...

    "user": {

...

}

}

]

3. Create the resource group for a new cluster

We first need to create the resource group where our new application will live, using the following command:

az group create -n ${RESOURCE_GROUP_NAME} -l ${LOCATION}

4. Create a Kubernetes resource on AKS

Now deploy the Kubernetes control plane on your resource group:

az aks create -g ${RESOURCE_GROUP_NAME} -n ${NAME} -s ${AGENT_SIZE} -c ${AGENT_COUINT} -l ${LOCATION} --generate-ssh-keys

5. Install Kubeflow

First, we need to obtain credentials to install Kubeflow on our AKS resource:

az aks get-credentials -n ${name} -g ${RESOURCE_GROUP_NAME}

6. Install kfctl

Install and unpack the tarball directory:

tar -xvf kfctl_v0.7.1_<platform>.tar.gz

7. Set environment variables

As with AWS, we need to enter values for a few key environment variables:

the application containing the Kubeflow configuration files (${KF_DIR}), the name of the Kubeflow deployment (${KF_NAME}), and the path to the base configuration URI (${CONFIG_URI}) - for Azure, this is https://raw.githubusercontent.com/kubeflow/manifests/v0.7-branch/kfdef/kfctl_k8s_istio.0.0.1.yaml).

8. Launch Kubeflow

The same as AWS,we use Kustomize to build the template file and launch Kubeflow:

mkdir -p ${KF_DIR}

cd ${KF_DIR}

ktctl apply -V -f ${CONFIG_URI}

Once Kubeflow is launched, you can use port forwarding to redirect traffic from local port 8880 to port 80 in the cluster to access the Kubeflow dashboard at localhost:8080 using the following command:

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




댓글 없음: