github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/kubernetes/r/namespace.html.markdown (about)

     1  ---
     2  layout: "kubernetes"
     3  page_title: "Kubernetes: kubernetes_namespace"
     4  sidebar_current: "docs-kubernetes-resource-namespace"
     5  description: |-
     6    Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces.
     7  ---
     8  
     9  # kubernetes_namespace
    10  
    11  Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces.
    12  Read more about namespaces at https://kubernetes.io/docs/user-guide/namespaces/
    13  
    14  ## Example Usage
    15  
    16  ```hcl
    17  resource "kubernetes_namespace" "example" {
    18    metadata {
    19      annotations {
    20        name = "example-annotation"
    21      }
    22  
    23      labels {
    24        mylabel = "label-value"
    25      }
    26  
    27      name = "terraform-example-namespace"
    28    }
    29  }
    30  
    31  ```
    32  
    33  ## Argument Reference
    34  
    35  The following arguments are supported:
    36  
    37  * `metadata` - (Required) Standard namespace's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata).
    38  
    39  ## Nested Blocks
    40  
    41  ### `metadata`
    42  
    43  #### Arguments
    44  
    45  * `annotations` - (Optional) An unstructured key value map stored with the namespace that may be used to store arbitrary metadata. More info: http://kubernetes.io/docs/user-guide/annotations
    46  * `generate_name` - (Optional) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more about [name idempotency](https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#idempotency).
    47  * `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) namespaces. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
    48  * `name` - (Optional) Name of the namespace, must be unique. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names
    49  
    50  #### Attributes
    51  
    52  * `generation` - A sequence number representing a specific generation of the desired state.
    53  * `resource_version` - An opaque value that represents the internal version of this namespace that can be used by clients to determine when namespaces have changed. Read more about [concurrency control and consistency](https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#concurrency-control-and-consistency).
    54  * `self_link` - A URL representing this namespace.
    55  * `uid` - The unique in time and space value for this namespace. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
    56  
    57  ## Import
    58  
    59  Namespaces can be imported using their name, e.g.
    60  
    61  ```
    62  $ terraform import kubernetes_namespace.n terraform-example-namespace
    63  ```