Skip to content

Commit

Permalink
Update dev guide to have GKE cluster install instructions 📝
Browse files Browse the repository at this point in the history
We had been pointing folks at the knative docs on cluster setup,
(https://github.com/knative/docs/blob/master/docs/install/Knative-with-GKE.md#creating-a-kubernetes-cluster)
but actually the requirements for running a knative cluster are much
more intense than just for running Tekton (they require 10 nodes, I've
been fine with just 3 all this time), so now let's have our own
instructions that we can keep in sync with Tekton.

Plus this way more of the info you need is right there in the dev guide
:)
  • Loading branch information
bobcatfish authored and tekton-robot committed May 30, 2019
1 parent ffbb679 commit 2fa2c5d
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,53 @@ configuring Kubernetes resources.
## Kubernetes cluster

Docker for Desktop using an edge version has been proven to work for both
developing and running Pipelines. Your Kubernetes version must be 1.11 or later.
developing and running Pipelines. The recommended configuration is:

- Kubernetes version 1.11 or later
- 4 vCPU nodes (`n1-standard-4`)
- Node autoscaling, up to 3 nodes
- API scopes for cloud-platform

To setup a cluster with GKE:

1. [Install required tools and setup GCP project](https://github.com/knative/docs/blob/master/docs/install/Knative-with-GKE.md#before-you-begin)
(You may find it useful to save the ID of the project in an environment
variable (e.g. `PROJECT_ID`).
1. [Create a GKE cluster](https://github.com/knative/docs/blob/master/docs/install/Knative-with-GKE.md#creating-a-kubernetes-cluster)

Note that
[the `--scopes` argument to `gcloud container cluster create`](https://cloud.google.com/sdk/gcloud/reference/container/clusters/create#--scopes)
controls what GCP resources the cluster's default service account has access to;
for example to give the default service account full access to your GCR
registry, you can add `storage-full` to your `--scopes` arg.
1. Create a GKE cluster (with `--cluster-version=latest` but you can use any version 1.11 or later):

```bash
export PROJECT_ID=my-gcp-project
export CLUSTER_NAME=mycoolcluster

gcloud container clusters create $CLUSTER_NAME \
--enable-autoscaling \
--min-nodes=1 \
--max-nodes=3 \
--scopes=cloud-platform \
--enable-basic-auth \
--no-issue-client-certificate \
--project=$PROJECT_ID \
--region=us-central1 \
--machine-type=n1-standard-4 \
--image-type=cos \
--num-nodes=1 \
--cluster-version=latest
```

Note that
[the `--scopes` argument to `gcloud container cluster create`](https://cloud.google.com/sdk/gcloud/reference/container/clusters/create#--scopes)
controls what GCP resources the cluster's default service account has access to;
for example to give the default service account full access to your GCR
registry, you can add `storage-full` to your `--scopes` arg.

1. Grant cluster-admin permissions to the current user:

```bash
kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole=cluster-admin \
--user=$(gcloud config get-value core/account)
```

## Environment Setup

Expand Down

0 comments on commit 2fa2c5d

Please sign in to comment.