How to create a namespace in minikube using Terraform

0 votes

Hi Guys,

I am new in Terraform. I want to create one namespace in my minikube cluster using Terraform. How can I do that?

Jun 30, 2020 in Terraform by akhtar
• 38,170 points
616 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use kubernetes_namespace resource. It is used to create a namespace in your Ks8 cluster. I have attached the code below for your reference.

provider "kubernetes" {
  config_context_cluster   = "minikube"
}
resource "kubernetes_namespace" "example" {
  metadata {
    name = "my-first-namespace"
  }
}

I hope this will help you.

answered Jun 30, 2020 by MD
• 95,180 points

Related Questions In Terraform

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,180 points
953 views
0 votes
1 answer

How to create a VPC in AWS using Terraform?

Hi@akhtar, You can find the script in the ...READ MORE

answered Jul 21, 2020 in Terraform by MD
• 95,180 points
336 views
0 votes
1 answer

How to create a route table in AWS using Terraform code?

Hi@akhtar, You can use aws_route_table resources in your ...READ MORE

answered Jul 21, 2020 in Terraform by MD
• 95,180 points
961 views
0 votes
1 answer

How to create a service account in GCP using Terraform?

Hi@akhtar, You can create a service account in ...READ MORE

answered Sep 12, 2020 in Terraform by MD
• 95,180 points
403 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
10,332 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 11, 2019 in Kubernetes by Kalgi
• 52,310 points

reshown Apr 12, 2019 by Kalgi 3,200 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 13, 2020 in Terraform by MD
• 95,180 points
646 views
0 votes
1 answer

How to create a folder in S3 bucket using terraform?

Hi@akhtar, You can use aws_s3_bucket_object resource to create one ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,180 points
3,057 views