-
Download, install and run the interactive installer specific to your platform (Linux, Windows, or Mac) https://cloud.google.com/sdk/downloads#interactive
-
Make sure to run
gcloud init
once setup, this will log into your gcloud account.- When gcloud prompts you to 'Pick cloud project to use', Make sure to select the dojo project assigned to your Google account (usually the first option).
-
Install Kubectl (command line tool for interacting with K8s Cluster):
gcloud components install kubectl
Note: Whilst gcloud/kubectl are installing head over to: console.cloud.google.com and start with either the Create kubernetes Cluster section and/or the Connect to Kubernetes Cluster section depending if you are using the free account assigned or your own.
Note: This step is only necessary if you choose to use your own GCloud account.
- Login to console.cloud.google.com with your Google Account
- Click the Burger menu on the top left and navigate to Kubernetes Engine.
- Click create cluster
- Make sure to change:
- the zone to any of the europe-west zones.
- Size from 3 to 2 (all of the premade clusters for this dojo are all 2 node clusters)
Prerequites:
- Ensure that you have run gcloud init and gcloud is logged into your Google account (gcloud init will run you through the login procedure).
- Ensure you have a K8s Cluster created/assigned to you.
Instructions:
- Login to console.cloud.google.com with your Google Account
- Click the Burger menu on the top left and navigate to Kubernetes Engine.
- Click the connect button on the kubernetes cluster (you either had created or had assigned to you.)
- Copy the command under Command-line access
- Open terminal/powershell.
- Paste and run the copied command.
- Run
kubectl cluster-info
to test if you can connect to the cluster. This will return information about where various cluster services are running. - Run
kubectl config view
- Copy down the value of 'access-token'
- Note: If for whatever reason you have connected to other kubernetes clusters in the past, there will be multiple access tokens, you'll need to find the correct access token. Look under 'name' for the name of the project-cluster you created/or had assigned. It should contain dojo near the end. e.g. gke_eco-league-201419_europe-west1-b_dojo1
- Run
kubectl proxy
- Go to localhost:8001/ui in your web browser, you should be presented with a sign in page.
- Select the token radio button and paste in the access token you copied earlier.
- Click Sign in and you should have access to your Kubernetes Dashboard!