Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 2.53 KB

README.md

File metadata and controls

50 lines (33 loc) · 2.53 KB

terraform - Infrastructure as Code with terraform

Create google cloud kubernetes cluster with default node pool

Experimental: Create kubernetes deployment and service with kubernetes provider from terraform (disable)

Guides

  1. Follow this GCP terraform tutorial to install terraform
  2. Follow this Configure gcloud SDK to configure gcloud

Steps

  1. Configure gcloud
  2. Run terraform init
  3. Create new workspace terraform workspace new blue
  4. Run terraform apply and then type "yes"

Optional steps (manual)

These steps will be replace by terraform files

  1. Run gcloud auth login to get a token
  2. Run gcloud container clusters get-credentials --zone us-central1 --project dsp-sock-shop-juan $(terraform workspace show)-gke-sock-shop to authenticate with your cluster. Replace project and zone according to your setup
  3. Rename cluster with kubectx gke-$(terraform workspace show)=gke_dsp-sock-shop-juan_us-central1_$(terraform workspace show)-gke-sock-shop

Optional: Install istio with istioctl

The current terraform script already provide istio into the cluster using helm. However, it is also possible to install istio using istioctl

  1. Install istioctl using brew install istioctl
  2. Apply istio config istioctl install
  3. Install istio operators

Note: Kiali requires prometheus to works. Additionally, it looks for jeager and grafana.

  • kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/prometheus.yaml
  • kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/grafana.yaml
  • kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/jaeger.yaml
  • kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/kiali.yaml
  • kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.12/samples/addons/extras/zipkin.yaml

Istio operators dashboards