I'm new to Terraform.
I am trying to:
- Create a Kubernetes cluster in GCP (GKE) using Terraform
- Deploy a K8s deployment to the same cluster using Terraform
How can I process to create a new cluster on GCP, and deploy some service on the cluster just created?
You should use first provider with
host
,token
andca_certificate
.The one with
config_path
will use config from your host, so will try to run kubernetes provider using your user, not terraform service account.Provider configuration looks good, I use same and it works.
Do you set up single cluster using Terraform or many? Can you share your terraform resources?