Skip to content

Commit 63b34cb

Browse files
sarahmaddoxk8s-ci-robot
authored andcommitted
Fixed up the GCP deployment guide for CLI v0.6 (#1021)
* WIP Fixing up the GCP deployment guide for CLI. * Further updates during CLI deployment testing. * More tweaks to wording for clarity.
1 parent 39bf96e commit 63b34cb

File tree

2 files changed

+66
-44
lines changed

2 files changed

+66
-44
lines changed

content/docs/gke/deploy/deploy-cli.md

+40-25
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ Before installing Kubeflow on the command line:
1616

1717
1. Ensure you have installed the following tools:
1818

19-
* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
20-
* [gcloud](https://cloud.google.com/sdk/)
19+
* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/).
20+
* [gcloud](https://cloud.google.com/sdk/). If you already have `gcloud`
21+
installed, run `gcloud components update` to
22+
get the latest version of all your installed Cloud SDK components.
2123

2224
1. If you're using
2325
[Cloud Shell](https://cloud.google.com/shell/), enable
@@ -70,16 +72,18 @@ Follow these steps to deploy Kubeflow:
7072
7173
```bash
7274
# The following command is optional, to make kfctl binary easier to use.
73-
export PATH=$PATH:<path to kfctl in your kubeflow installation>
74-
export ZONE=<your target zone> #where the deployment will be created
75+
export PATH=$PATH:<path to your kfctl file>
76+
export ZONE=<your target GCP zone> # where the deployment will be created
7577
7678
export PROJECT=<your GCP project ID>
7779
78-
# The value of KFAPP must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. (For example, 'kubeflow-test' or 'kfw-test'.)
80+
# Set KFAPP to the name of your Kubeflow application. See detailed
81+
# description in the text below this code snippet.
82+
# For example, 'kubeflow-test' or 'kfw-test'.
7983
export KFAPP=<your choice of application directory name>
80-
# Default uses Cloud IAP:
84+
# Run this command for the default installation which uses Cloud IAP:
8185
kfctl init ${KFAPP} --platform gcp --project ${PROJECT}
82-
# Alternatively, use this command if you want to use basic authentication:
86+
# Alternatively, run this command if you want to use basic authentication:
8387
kfctl init ${KFAPP} --platform gcp --project ${PROJECT} --use_basic_auth -V
8488
8589
cd ${KFAPP}
@@ -90,6 +94,9 @@ Follow these steps to deploy Kubeflow:
9094
configurations to be stored. This directory is created when you run
9195
`kfctl init`. If you want a custom deployment name, specify that name here.
9296
The value of this variable becomes the name of your deployment.
97+
The value of KFAPP must consist of lower case alphanumeric characters or
98+
'-', and must start and end with an alphanumeric character.
99+
For example, 'kubeflow-test' or 'kfw-test'.
93100
The value of this variable cannot be greater than 25 characters. It must
94101
contain just the directory name, not the full path to the directory.
95102
The content of this directory is described in the next section.
@@ -98,37 +105,41 @@ Follow these steps to deploy Kubeflow:
98105
* **${ZONE}** - You can see a list of zones [here](https://cloud.google.com/compute/docs/regions-zones/#available).
99106
If you plan to use accelerators, make sure to pick a zone that supports the type you want.
100107
* When you run `kfctl init` you need to choose to use either IAP or basic
101-
authentication, as described below.
108+
authentication, as described above.
102109
* `kfctl generate all` attempts to fetch your email address from your
103110
credential. If it can't find a valid email address, you need to pass a
104111
valid email address with flag `--email <your email address>`. This email
105112
address becomes an administrator in the configuration of your Kubeflow
106113
deployment.
107114
108115
109-
1. The deployment process creates a separate deployment for your data storage. After
110-
running `kfctl apply` you should notice two new [deployments](https://console.cloud.google.com/dm/deployments):
116+
1. The deployment process creates a separate deployment for your data storage.
117+
After running `kfctl apply` you should notice two new [deployments](https://console.cloud.google.com/dm/deployments):
111118
* **{KFAPP}-storage**: This deployment has persistent volumes for your
112119
pipelines.
113-
* **{KFAPP}**: This deployment has all the components of Kubeflow, including a [GKE cluster](https://console.cloud.google.com/kubernetes/list) named **${KFAPP}** with Kubeflow installed.
120+
* **{KFAPP}**: This deployment has all the components of Kubeflow, including
121+
a [GKE cluster](https://console.cloud.google.com/kubernetes/list)
122+
named **${KFAPP}** with Kubeflow installed.
114123
115-
1. Once the deployment finishes, check the resources installed in the namespace `kubeflow` in your new cluster. To do this from the command line, first set your `kubectl` credentials to point to the new cluster:
124+
1. When the deployment finishes, check the resources installed in the namespace
125+
`kubeflow` in your new cluster. To do this from the command line, first set
126+
your `kubectl` credentials to point to the new cluster:
116127
117128
```
118129
gcloud container clusters get-credentials ${KFAPP} --zone ${ZONE} --project ${PROJECT}
119130
```
120131
121-
Then, see what's installed in the `kubeflow` *namespace* of your GKE cluster:
132+
Then see what's installed in the `kubeflow` namespace of your GKE cluster:
122133
123134
```
124-
kubectl -n kubeflow get all
135+
kubectl -n kubeflow get all
125136
```
126137
127-
128-
1. Kubeflow will be available at the following URI:
138+
1. Access the Kubeflow central dashboard at the following URI when it becomes
139+
available:
129140
130141
```
131-
https://<deployment_name>.endpoints.<project>.cloud.goog/
142+
https://<KFAPP>.endpoints.<project-id>.cloud.goog/
132143
```
133144
* It can take 20 minutes for the URI to become available.
134145
Kubeflow needs to provision a signed SSL certificate and register a DNS
@@ -145,9 +156,9 @@ Follow these steps to deploy Kubeflow:
145156
146157
## Understanding the deployment process
147158
148-
The deployment process is controlled by 4 different commands:
159+
The `kfctl` deployment process includes by the following commands:
149160
150-
* **init** - one time set up.
161+
* **init** - performs a one-time setup.
151162
* **generate** - creates configuration files defining the various resources.
152163
* **apply** - creates or updates the resources.
153164
* **delete** - deletes the resources.
@@ -159,7 +170,7 @@ following:
159170
* **platform** - all GCP resources; that is, anything that doesn't run on
160171
Kubernetes.
161172
* **k8s** - all resources that run on Kubernetes.
162-
* **all** - GCP and Kubernetes resources.
173+
* **all** - all GCP and Kubernetes resources.
163174
164175
### App layout
165176
@@ -178,16 +189,20 @@ Your Kubeflow app directory **${KFAPP}** contains the following files and direct
178189
* The directory is created when you run `kfctl generate platform`.
179190
* You can modify these configurations to customize your GCP infrastructure.
180191
181-
* **kustomize** is a directory that contains the kustomize packages for Kubeflow applications.
192+
* **kustomize** is a directory that contains the kustomize packages for Kubeflow
193+
applications. See
194+
[how Kubeflow uses kustomize](/docs/components/misc/kustomize/).
182195
183196
* The directory is created when you run `kfctl generate`.
184-
* You can customize the Kubernetes resources (modify the manifests and run `kfctl apply` again).
197+
* You can customize the Kubernetes resources by modifying the manifests and
198+
running `kfctl apply` again.
185199
186200
### GCP service accounts
187201
188202
Creating a deployment using `kfctl` creates three service accounts in your
189-
GCP project. These service accounts are created using the principle of least
190-
privilege. The three service accounts are:
203+
GCP project. These service accounts are created using the [principle of least
204+
privilege](https://en.wikipedia.org/wiki/Principle_of_least_privilege).
205+
The three service accounts are:
191206
192207
* `${KFAPP}-admin` is used for some admin tasks like configuring the load
193208
balancers. The principle is that this account is needed to deploy Kubeflow but
@@ -196,7 +211,7 @@ privilege. The three service accounts are:
196211
GCP resources (Cloud Storage, BigQuery, etc.). This account has a much smaller
197212
set of privileges compared to `admin`.
198213
* `${KFAPP}-vm` is used only for the virtual machine (VM) service account. This
199-
account has minimal permissions, needed to send metrics and logs to
214+
account has the minimal permissions needed to send metrics and logs to
200215
[Stackdriver](https://cloud.google.com/stackdriver/).
201216
202217
## Next steps

content/docs/gke/deploy/oauth-setup.md

+26-19
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ when deploying Kubeflow on GCP,
1010
then you must follow these instructions to create an OAuth client for use
1111
with Kubeflow.
1212

13-
You can skip the instructons on this page if you want to use basic
13+
You can skip the instructions on this page if you want to use basic
1414
authentication (username and password) with Kubeflow instead of Cloud IAP.
1515
Cloud IAP is recommended for production deployments or deployments with access
1616
to sensitive data.
@@ -42,50 +42,57 @@ address to verify the user's identity.
4242
alt="OAuth consent screen"
4343
class="mt-3 mb-3 p-3 border border-info rounded">
4444
45-
1. On the [credentials tab](https://console.cloud.google.com/apis/credentials):
45+
1. On the [credentials screen](https://console.cloud.google.com/apis/credentials):
4646
* Click **Create credentials**, and then click **OAuth client ID**.
4747
* Under **Application type**, select **Web application**.
4848
* In the **Name** box enter any name for your OAuth client ID. This is *not*
4949
the name of your application nor the name of your Kubeflow deployment. It's
5050
just a way to help you identify the OAuth client ID.
5151
52-
1. You need to click create
53-
54-
* You will see a dialog box like the one below
52+
1. Click **Create**. A dialog box appears, like the one below:
5553
5654
<img src="/docs/images/new-oauth.png"
5755
alt="OAuth consent screen"
5856
class="mt-3 mb-3 p-3 border border-info rounded">
5957
60-
* You should write down the CLIENT_ID because you will need it in the next step
58+
1. Copy the **client ID** shown in the dialog box, because you need the client
59+
ID in the next step.
6160
62-
1. From the credentials tab find your newly created OAuth credential and click the pencil icon to
63-
edit
61+
1. On the **Create credentials** screen, find your newly created OAuth
62+
credential and click the pencil icon to edit it:
6463
6564
<img src="/docs/images/oauth-edit.png"
6665
alt="OAuth consent screen"
6766
class="mt-3 mb-3 p-3 border border-info rounded">
6867
69-
1. In the **Authorized redirect URIs** box, enter the following (if it's not already present
70-
in the list of authorized redirect URIs):
68+
1. In the **Authorized redirect URIs** box, enter the following (if it's not
69+
already present in the list of authorized redirect URIs):
7170
7271
```
7372
https://iap.googleapis.com/v1/oauth/clientIds/<CLIENT_ID>:handleRedirect
7473
```
75-
* `<CLIENT_ID>` is the OAuth client ID, something like `XXX.apps.googleusercontent.com`.
76-
* Note that the URI is not dependent on the Kubeflow deployment or endpoint. Multiple Kubeflow
77-
deployments can share the same OAuth client without the need to modify the redirect URIs.
74+
* `<CLIENT_ID>` is the OAuth client ID, something like
75+
`XXX.apps.googleusercontent.com`. Do not include the angle brackets around
76+
the client ID.
77+
* Note that the URI is not dependent on the Kubeflow deployment or endpoint.
78+
Multiple Kubeflow deployments can share the same OAuth client without the
79+
need to modify the redirect URIs.
7880
79-
* Here's an example of the completed form:
80-
<img src="/docs/images/oauth-credential.png"
81-
alt="OAuth credentials"
82-
class="mt-3 mb-3 p-3 border border-info rounded">
8381
8482
1. Press **Enter/Return** to add the URI. Check that the URI now appears as
8583
a confirmed item under **Authorized redirect URIs**. (The URI should no longer be
8684
editable.)
87-
1. Make note of the **client ID** and **client secret** that appear in the OAuth
88-
client window. You need them later to enable Cloud IAP.
85+
86+
Here's an example of the completed form:
87+
<img src="/docs/images/oauth-credential.png"
88+
alt="OAuth credentials"
89+
class="mt-3 mb-3 p-3 border border-info rounded">
90+
91+
1. Click **Save**.
92+
93+
1. Make note that you can find your OAuth client credentials in the credentials
94+
section of the GCP Console. You need to retrieve the **client ID** and
95+
**client secret** later when you're ready to enable Cloud IAP.
8996
9097
## Next steps
9198

0 commit comments

Comments
 (0)