Skip to content

Latest commit

 

History

History
76 lines (67 loc) · 2.58 KB

README.md

File metadata and controls

76 lines (67 loc) · 2.58 KB

k8s

Here, we will go through the steps of configuring our k8s environment, playing around with the necessary commands and such, then distributing some manifests to our cluster.

Steps

  • install local dependencies
  • cloud setup
  • enable k8s engine
  • create service account
  • git and configure
  • test cluster connectivity

install local dependencies

You need kubectl (cube-control) to manage and operate your k8s cluster from a local machine.

  • Mac
brew install kubernetes-cli

You will need helm too

  • Mac
brew install kubernetes-helm

You should have gcloud on your system as well. This way you can manipulate gcp from the local cli.

brew cask install google-cloud-sdk

enable k8s engine

  • Navigate to K8s Engine in GCP Console
  • Enable the K8s API

create service account

  • Navigate to the IAM section
  • Navigate to Service Accounts
  • Create a new service account
  • Give it admin credentials
  • Generate a .json key_file
  • Store the .json key_file locally somewhere you can access later

git and configure

cd k8s
  • read the comments and make the necessary changes
  • initialize
terraform init
  • plan
terraform plan
  • apply
terraform apply

test cluster connectivity

Assuming all went well and we all have k8s clusters on GCP, we should be able to navigate to our cluster from the k8s engine tab from the GCP console. Click on the connect button and copy/paste the gcloud command into your local terminal. Now run

kubectl get nodes

... I bet you see your cluster. If you don't, just let me know.

If all is well then we can move on to the k8sWithIstio directory and dig into the tool.