How to launch one Pod in Minikube using Terraform

0 votes

Hi Guys,

I am new in Terraform. I want to use Kubernetes as a Terraform provider to launch one Pod. Can anyone help me how can I launch one Pod using Terraform in Minikube Cluster?

Jun 16, 2020 in Terraform by akhtar
• 38,260 points
3,392 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use kubernetes_pod resource to launch one Pod in Minikube Cluster with the help of Terraform. This resource will automatically connect with Minikube. You can go through the below-given example.

provider "kubernetes" {
  config_context_cluster   = "minikube"
}

resource "kubernetes_pod" "mypod1" {
  metadata {
    name = "mypod"
  }
  spec {
    container {
      image = "httpd"
      name  = "webcon"
    }
  }
}
answered Jun 16, 2020 by MD
• 95,460 points
Config context cluster=minikube
Why you used minikube there you might give username and pass or certificates in config file

You can do that way also. But you can check this link once.

https://www.terraform.io/docs/providers/kubernetes/index.html

Related Questions In Terraform

0 votes
1 answer

How to create one S3 bucket in AWS using Terraform?

Hi@akhtar, You need to set aws provider name ...READ MORE

answered Jul 23, 2020 in Terraform by MD
• 95,460 points
1,404 views
0 votes
1 answer

How to launch one EC2 instance for WordPress using Terraform?

Hi@akhtar, You can use the aws_instance resource in Terraform. ...READ MORE

answered Sep 9, 2020 in Terraform by MD
• 95,460 points
850 views
0 votes
1 answer

How to launch one MySQL instance using Terraform code?

Hi@akhtar, You can use the aws_instance resource in Terraform. This ...READ MORE

answered Sep 9, 2020 in Terraform by MD
• 95,460 points
1,278 views
0 votes
1 answer

How to launch an instance in GCP using Terraform?

Hi@akhtar, You can use the google_compute_instance resource in ...READ MORE

answered Sep 12, 2020 in Terraform by MD
• 95,460 points
839 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
15,476 views
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 52,350 points
1,396 views
0 votes
1 answer

How to create one key in AWS using terraform?

Hi@akhtar, You can use aws_key_pair resource n terraform. ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,460 points
1,557 views
0 votes
1 answer

How to create a namespace in minikube using Terraform?

Hi@akhtar, You can use kubernetes_namespace resource. It is used ...READ MORE

answered Jun 30, 2020 in Terraform by MD
• 95,460 points
1,696 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP