페이지

2022년 2월 23일 수요일

Installing Kubeflow in GCP

 Like AWS, Google Cloud Platform(GCP) provides a managed Kubernetes control plane, GKE. We can install Kubeflow in GCO using the following steps:

1. Register for a GCP account and create a project on the console

This project will be where the various resources associated with Kubeflow will reside.

2. Enable required services

The services required to run Kubeflow on GCP are:

* Compute Engine API

* Kubernetes Engine API

* Identity and Access Management(IAM) API

* Deployment Manager API

* Cloud Resource Manager API

* Cloud Filestore API

* AI Platform Training & Prediction API

3. Set up OAuth(optional)

If you wish to make a secure deployment, then, as with AWS, you must follow instructions to add authentication to your installation, located at (https://www.kubeflow.org/docs/gke/deploy/oauth-setup/). Alternatively, you can just use the name and password for your GCP account.

4. Set up the GCloud CLI

This is parallel to the AWS CLI covered in the previous section. Installation instructions are available at https://cloud.google.com/sdk/. You can verify your installation by running:

gcloud --help

5. Download the kubeflow command-line tool

Links are located on the Kubeflow releases page(https://github.com/kubeflow/kubeflow/releases/tag/v0.7.1). Download one of these directories and unpack the tarball using:

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

6. Log in to GCloud and create user credentials

We next need to create a login account and credential token we will use to interact with resources in our account.

gcloud auth login

gcloud auth application-default login

7. Set up environment variable and deploy Kubeflow

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 Kuveflow deployment (${KF_NAME}), the path to the base configuration URI (${CONFIG_URI} - for GCP this is https://raw. githubusercontent.com/kubeflow/manifests/v0.7-branch/ktdef/ktctl_gcp_iap.0.7.1.yaml), the name of the Google project ($PROJECT}), and the zone it runs in (${ZONE}).

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}

kfctl apply -V -f ${CONFIG_URI}

Once Kubeflow is launched, you can get the URL to the dashboard using:

kubectl -n istio-system get ingress


댓글 없음: