How to create a namespace in the Kubernetes cluster using Terraform

0 votes

Hi Guys,

I have created one Kubernetes Cluster. I want to create one namespace to this cluster using Terraform code. How can I do that?

Sep 14, 2020 in Terraform by akhtar
• 38,230 points
7,964 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use kubernetes_namespace resource in your Terraform code. This resource is used to create a namespace in your Kubernetes cluster from Terraform. You can see the below example.

provider "kubernetes" {
  config_context = "minikube"
}
resource "kubernetes_namespace" "example" {
  metadata {
    name = "my-first-namespace"
  }
}
answered Sep 14, 2020 by MD
• 95,440 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,230 points
589 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,440 points
2,431 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,440 points
1,093 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,440 points
5,240 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
14,494 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,360 points

reshown Apr 12, 2019 by Kalgi 5,956 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,440 points
1,384 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,440 points
9,983 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