Prepare the local working environment

Google Cloud account

We will be creating a cluster on Google’s Kubernetes Engine (GKE). We will provide Google Cloud free lab accounts to support this workshop during SRECon EMEA 2019.

To avoid conflicts with your personal account, please open a new incognito window for the rest of this lab. Incognito window

  1. Sign in to the Google Cloud Platform Console: https://console.cloud.google.com/ with the provided credentials. In Welcome to your new account dialog, click Accept.

Incognito window

  1. Then you have to approve Google Cloud Terms of Service, check Terms of Service, choose your country of residend and click Agree and Continue:

Google Cloud Terms of Service

  1. If you see a top bar with Activate Free Trial - DO NOT ACTIVATE THE FREE TRIAL. Click Dismiss since we will be using a pre-provisioned lab accounts. If you are doing this on your own account (outside of SRECon workshop), then you may want the free trial.

Google Cloud Trial Account

  1. Click Select a project and select the project already created for the workshop:

Google Cloud Select Project

You should see the dashboard of the selected project:

Google Cloud Select Project

If you are running the workshop of your own, you have to create a project.

Install gcloud CLI:

  1. Install the gcloud CLI by following the instruction on : https://cloud.google.com/sdk/docs/downloads-interactive.

  2. Configure your project with gcloud init.

    gcloud version
    
    Google Cloud SDK 264.0.0
    beta 2019.05.17
    bq 2.0.47
    core 2019.09.22
    gsutil 4.42
    
  3. Configure your profile on gcloud account using :

    gcloud init
    
  4. Choose the option [2] Create a new configuration then choose a configuration name (for example: istioworkshop-srecon19)

  5. Then choose option [2] Log in with a new account, Enter the email address of the Google Account provided for the training. You browser will be opened so you could grant access to gcloud cli.

GCloud authorize

  1. Then pick up the project you have created:

    Pick cloud project to use:
    [1] srecon19-workshop-250603
    
  2. Finally, run the command gcloud auth list to check the the right account is used:

    gcloud auth list
           Credentialed Accounts
    ACTIVE  ACCOUNT
        rafik.harabi@innovsquare.com
    *       trainee001.srecon19@innovsquare.com
    
    To set the active account, run:
    $ gcloud config set account 'ACCOUNT'
    

Install kubectl CLI

  1. Install the kubectl command-line tool:

    gcloud components install kubectl
    
  2. Check that kubectl is installed by using the command:

    kubectl version
    

You will have the fellowing output:

Client Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.11-dispatcher", GitCommit:"2e298c7e992f83f47af60cf4830b11c7370f6668", GitTreeState:"clean", BuildDate:"2019-09-
19T22:20:12Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?

The error regarding Kubernetes version which is normal as we haven’t yet create a Kubernetes Cluster.