|
1 | 1 | # Instructions for deploying Kubeflow |
2 | 2 |
|
3 | 3 | Prerequisites |
4 | | - - install [kubectl](https://kubernetes.io/docs/tasks/tools/#install-kubectl-on-linux) |
5 | | - - Install and configure [Azure Command Line Interface](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) |
| 4 | + install [kubectl](https://kubernetes.io/docs/tasks/tools/#install-kubectl-on-linux) |
| 5 | + Install and configure [Azure Command Line Interface](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) |
6 | 6 | -log in with az login |
7 | 7 | -Install Docker |
8 | | - - For Windows and WSL [Guide](https://docs.docker.com/desktop/windows/wsl/) |
9 | | - - For other OS [Docker Desktop](https://docs.docker.com/docker-hub/) |
| 8 | + For Windows and WSL [Guide](https://docs.docker.com/desktop/windows/wsl/) |
| 9 | + For other OS [Docker Desktop](https://docs.docker.com/docker-hub/) |
10 | 10 |
|
11 | 11 |
|
12 | 12 |
|
13 | 13 | # Azure Setup |
14 | 14 |
|
15 | 15 | To log into Azure from the command line interface, run the following commands |
16 | | - -az login |
17 | | - -az account set --subscription <NAME OR ID OF SUBSCRIPTION> |
18 | | - |
| 16 | +``` |
| 17 | +az login |
| 18 | +az account set --subscription <NAME OR ID OF SUBSCRIPTION> |
| 19 | +``` |
19 | 20 | Create a resource group (if neccessary) |
20 | | - -az group create -n <RESOURCE_GROUP_NAME> -l <LOCATION> |
21 | | - |
| 21 | +``` |
| 22 | +az group create -n <RESOURCE_GROUP_NAME> -l <LOCATION> |
| 23 | +``` |
22 | 24 |
|
23 | 25 | Create a specifically defined cluster: |
24 | | - -az aks create -g <RESOURCE_GROUP_NAME> -n <NAME> -s <AGENT_SIZE> -c <AGENT_COUNT> -l <LOCATION> --generate-ssh-keys |
25 | | - |
| 26 | +``` |
| 27 | +az aks create -g <RESOURCE_GROUP_NAME> -n <NAME> -s <AGENT_SIZE> -c <AGENT_COUNT> -l <LOCATION> --generate-ssh-keys |
| 28 | +``` |
26 | 29 |
|
27 | 30 |
|
28 | 31 | # KubeFlow installation |
29 | 32 |
|
30 | 33 | Create user credentials. You only need to run this command once. |
31 | | - -az aks get-credentials -n <NAME> -g <RESOURCE_GROUP_NAME> |
32 | | - |
| 34 | +``` |
| 35 | +az aks get-credentials -n <NAME> -g <RESOURCE_GROUP_NAME> |
| 36 | +``` |
33 | 37 | Download the kfctl v1.2.0 release from the [Kubeflow releases page](https://github.com/kubeflow/kfctl/releases/tag/v1.2.0) |
34 | 38 |
|
35 | 39 | Unpack the tar ball |
36 | | - -tar -xvf kfctl_v1.2.0_<platform>.tar.gz |
37 | | - |
| 40 | +``` |
| 41 | +tar -xvf kfctl_v1.2.0_<platform>.tar.gz |
| 42 | +``` |
38 | 43 | Run the following commands to set up and deploy Kubeflow in order. The code below includes an optional command to add the binary kfctl to your path. If you don’t add the binary to your path, you must use the full path to the kfctl binary each time you run it. |
39 | 44 |
|
| 45 | +``` |
| 46 | +export PATH=$PATH:"<path-to-kfctl> |
40 | 47 |
|
41 | | - - export PATH=$PATH:"<path-to-kfctl> |
42 | | - |
43 | | - - export KF_NAME=<your choice of name for the Kubeflow deployment> |
| 48 | +export KF_NAME=<your choice of name for the Kubeflow deployment> |
44 | 49 |
|
45 | | - - export BASE_DIR=<path to a base directory> |
| 50 | +export BASE_DIR=<path to a base directory> |
46 | 51 | |
47 | | - - export KF_DIR=${BASE_DIR}/${KF_NAME} |
48 | | - |
49 | | - - export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml" |
50 | | - |
51 | | - - mkdir -p ${KF_DIR} |
52 | | - - cd ${KF_DIR} |
53 | | - - kfctl apply -V -f ${CONFIG_URI} |
54 | | - |
55 | | - |
56 | | - Run this command to check that the resources have been deployed correctly in namespace kubeflow |
57 | | - |
58 | | - - kubectl get all -n kubeflow |
59 | | - |
60 | | - Open the KubeFlow Dashboard , the default installation does not create an external endpoint but you can use port-forwarding to visit your cluster. Run the following command |
61 | | - |
62 | | - - kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80 |
63 | | - |
64 | | - Next, open http://localhost:8080 in your browser. |
| 52 | +export KF_DIR=${BASE_DIR}/${KF_NAME} |
| 53 | +
|
| 54 | +export CONFIG_URI="https://raw.githubusercontent.com/kubeflow/manifests/v1.2-branch/kfdef/kfctl_k8s_istio.v1.2.0.yaml" |
| 55 | +
|
| 56 | +mkdir -p ${KF_DIR} |
| 57 | +cd ${KF_DIR} |
| 58 | +kfctl apply -V -f ${CONFIG_URI} |
| 59 | +``` |
| 60 | + |
| 61 | +Run this command to check that the resources have been deployed correctly in namespace kubeflow |
| 62 | +``` |
| 63 | +kubectl get all -n kubeflow |
| 64 | +``` |
| 65 | +Open the KubeFlow Dashboard , the default installation does not create an external endpoint but you can use port-forwarding to visit your cluster. Run the following command |
| 66 | +``` |
| 67 | +kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80 |
| 68 | +``` |
| 69 | +Next, open http://localhost:8080 in your browser. |
0 commit comments