kubernetes_namespace

Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces. Read more about namespaces at Kubernetes reference.

Example Usage

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

    labels = {
      mylabel = "label-value"
    }

    name = "terraform-example-namespace"
  }
}

Argument Reference

The following arguments are supported:

Timeouts

kubernetes_namespace provides the following Timeouts configuration options:

Nested Blocks

metadata

Arguments

Attributes

Attribute Reference

Import

Namespaces can be imported using their name, e.g.

$ terraform import kubernetes_namespace.n terraform-example-namespace