Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.84 KB

workshop-setup.md

File metadata and controls

57 lines (39 loc) · 1.84 KB

A Google Cloud Platform Account

For this workshop, one will be provided for you.

Enable Google Cloud Platform APIs

Enable the Google Compute Engine and Google Container Engine APIs

Setup Cloud Shell

In this section you will start your Google Cloud Shell and clone the lab code repository to it.

  1. Create a new Google Cloud Platform project: https://console.developers.google.com/project

  2. Click the Google Cloud Shell icon in the top-right and wait for your shell to open:

  1. When the shell is open, set your default compute zone:
$ gcloud config set compute/zone us-east1-d
  1. Clone the lab repository in your cloud shell, then cd into that dir:
$ git clone https://github.com/askcarter/continuous-deployment-on-kubernetes.git
Cloning into 'continuous-deployment-on-kubernetes'...
...

$ cd continuous-deployment-on-kubernetes

Create a Kubernetes Cluster

You'll use Google Container Engine to create and manage your Kubernetes cluster. Provision the cluster with gcloud:

$ gcloud container clusters create jenkins-cd \
  --num-nodes 3 \
  --scopes "https://www.googleapis.com/auth/projecthosting,storage-rw"

Once that operation completes download the credentials for your cluster using the gcloud CLI:

$ gcloud container clusters get-credentials jenkins-cd
Fetching cluster endpoint and auth data.
kubeconfig entry generated for jenkins-cd.

Confirm that the cluster is running and kubectl is working by listing pods:

$ kubectl get pods

You should see an empty response.