Difference between revisions of "Terraform resource: kubernetes namespace"

From wikieduonline
Jump to navigation Jump to search
Line 9: Line 9:
 
       name = "example-annotation"
 
       name = "example-annotation"
 
     }
 
     }
 
+
 
     labels = {
 
     labels = {
 
       mylabel = "label-value"
 
       mylabel = "label-value"
 
     }
 
     }
 
+
 
     name = "terraform-example-namespace"
 
     name = "terraform-example-namespace"
 
   }
 
   }
 
  }
 
  }
 +
 +
== Errors ==
 +
* <code>Error: namespaces "amazon-cloudwatch" already exists</code>
  
 
== See also ==
 
== See also ==

Revision as of 17:17, 1 February 2024

https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace

  • name - (Optional) Name of the namespace, must be unique. Cannot be updated

Official examples

resource "kubernetes_namespace" "example" {
 metadata {
   annotations = {
     name = "example-annotation"
   }

   labels = {
     mylabel = "label-value"
   }

   name = "terraform-example-namespace"
 }
}

Errors

  • Error: namespaces "amazon-cloudwatch" already exists

See also

Advertising: