Removing $PROJECT_ID variable entirely

This commit is contained in:
Sam O'Dell 2018-07-20 11:20:42 -07:00 committed by GitHub
parent 2c12b88124
commit d38be9d4de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 21 deletions

View File

@ -38,42 +38,39 @@ commands will need to be adjusted for use in a Windows environment.
To simplify the command lines for this walkthrough, we need to define a few To simplify the command lines for this walkthrough, we need to define a few
environment variables. environment variables.
1. Set a `PROJECT_ID` variable. Set `CLUSTER_NAME` and `CLUSTER_ZONE` variables:
* If you don't have an existing GCP project that you'd like to use, replace
`my-knative-project` in the following command with the project ID you'd like to use. This variable ```bash
is used later to create your new GCP project. The project ID must be globally export CLUSTER_NAME=knative
unique across all GCP projects. export CLUSTER_ZONE=us-west1-c
```bash ```
export PROJECT_ID=my-knative-project The CLUSTER_NAME needs to be lowercase and unique among any other Kubernetes
``` clusters in your GCP project. The zone can be
Tip: Enter `gcloud config get-value project` to view the ID of your default GCP project. [any compute zone available on GCP](https://cloud.google.com/compute/docs/regions-zones/#available).
1. Set `CLUSTER_NAME` and `CLUSTER_ZONE` variables: These variables are used later to create a Kubernetes cluster.
```bash
export CLUSTER_NAME=knative
export CLUSTER_ZONE=us-west1-c
```
The CLUSTER_NAME needs to be lowercase and unique among any other Kubernetes
clusters in your GCP project. The zone can be
[any compute zone available on GCP](https://cloud.google.com/compute/docs/regions-zones/#available).
These variables are used later to create a Kubernetes cluster.
### Setting up a Google Cloud Platform project ### Setting up a Google Cloud Platform project
You need a GCP project to create a Google Kubernetes Engine cluster. You need a GCP project to create a Google Kubernetes Engine cluster.
1. Create a new GCP project and set it as your `gcloud` default, or set an 1. Create a new GCP project and set it as your `gcloud` default, or set an
existing GCP as your `gcloud` default: existing GCP project as your `gcloud` default:
* If you don't already have a GCP project created, create a new project in `gcloud`: * If you don't already have a GCP project created, create a new project in `gcloud`:
```bash ```bash
gcloud projects create $PROJECT_ID --set-as-default gcloud projects create my-knative-project --set-as-default
``` ```
Replace `my-knative-project` with the name you'd like to use for your GCP project.
You also need to [enable billing](https://cloud.google.com/billing/docs/how-to/manage-billing-account) You also need to [enable billing](https://cloud.google.com/billing/docs/how-to/manage-billing-account)
for your new project. for your new project.
* If you already have a GCP project, make sure your project is set as your * If you already have a GCP project, make sure your project is set as your
`gcloud` default: `gcloud` default:
```bash ```bash
gcloud config set project $PROJECT_ID gcloud config set project my-knative-project
``` ```
> Tip: Enter `gcloud config get-value project` to view the ID of your default GCP project.
1. Enable the necessary APIs: 1. Enable the necessary APIs:
``` ```
gcloud services enable \ gcloud services enable \