Skip to content

A terraform repo to provision a GKE cluster

License

Notifications You must be signed in to change notification settings

SpringForAll/terraform-gke

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A terraform repo to provision a GKE cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 61.6%
  • HCL 38.4%