github.com/sixgill/terraform@v0.9.0-beta2.0.20170316214032-033f6226ae50/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 ``` 17 resource "kubernetes_namespace" "example" { 18 metadata { 19 annotations { 20 name = "example-annotation" 21 } 22 labels { 23 mylabel = "label-value" 24 } 25 name = "TerraformExampleNamespace" 26 } 27 } 28 29 ``` 30 31 ## Argument Reference 32 33 The following arguments are supported: 34 35 * `metadata` - (Required) Standard namespace's [metadata](https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata). 36 37 ## Nested Blocks 38 39 ### `metadata` 40 41 #### Arguments 42 43 * `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 44 * `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). 45 * `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 46 * `name` - (Optional) Name of the namespace, must be unique. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names 47 48 #### Attributes 49 50 * `generation` - A sequence number representing a specific generation of the desired state. 51 * `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). 52 * `self_link` - A URL representing this namespace. 53 * `uid` - The unique in time and space value for this namespace. More info: http://kubernetes.io/docs/user-guide/identifiers#uids 54 55 ## Import 56 57 Namespaces can be imported using their name, e.g. 58 59 ``` 60 $ terraform import kubernetes_namespace.n TerraformExampleNamespace 61 ```