How to connect to the Kubernetes cluster from Terraform

0 votes

Hi Guys,

I am new to Terraform. I have a Kubernetes cluster in my system. I want to control the Kubernetes cluster using Terraform code. How can I do that?

Sep 14, 2020 in Terraform by akhtar
• 38,210 points
162 views

1 answer to this question.

0 votes

Hi@akhtar,

You need to install the plugins using the terraform init command for the Kubernetes cluster. From the plugins you will get Kubernetes provider. You need to use the provider name in your code as shown below.

provider "kubernetes" {
  config_context = "minikube"
}
answered Sep 14, 2020 by MD
• 95,300 points

Related Questions In Terraform

0 votes
0 answers

How to create a Kubernetes cluster on Google Cloud using Terraform?

Hi Team, I am new to Terraform. I ...READ MORE

Dec 1, 2020 in Terraform by akhtar
• 38,210 points
135 views
0 votes
1 answer

How to create a rds snapshot from running rds instance in AWS using terraform?

Hi, I think you can use aws_db_instance resource to ...READ MORE

answered Jul 20, 2020 in Terraform by MD
• 95,300 points
1,199 views
0 votes
1 answer

How to read input from CSV file or any file instead of using tfvars file in Terraform?

Hi, You can use the file function in Terraform. ...READ MORE

answered Jul 27, 2020 in Terraform by MD
• 95,300 points
1,325 views
0 votes
1 answer

How to read data from a file in Terraform?

Hi@akhtar, You can use the file function in Terraform. This file function ...READ MORE

answered Jul 27, 2020 in Terraform by MD
• 95,300 points
2,656 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
11,153 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,370 points

reshown Apr 12, 2019 by Kalgi 3,547 views
0 votes
1 answer

How to create a namespace in the Kubernetes cluster using Terraform?

Hi@akhtar, You can use kubernetes_namespace resource in your ...READ MORE

answered Sep 14, 2020 in Terraform by MD
• 95,300 points
1,263 views
0 votes
1 answer

How to integrate kubernetes with Terraform?

Hi@akhtar, You can use Kubernetes as your Terraform ...READ MORE

answered Jun 16, 2020 in Terraform by MD
• 95,300 points
244 views