kubernetes/docs/user-guide/identifiers.md

53 lines
2.3 KiB
Markdown
Raw Normal View History

2015-07-12 00:04:52 -04:00
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
<!-- BEGIN STRIP_FOR_RELEASE -->
2015-07-16 13:02:26 -04:00
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.
2015-12-14 13:37:38 -05:00
<!-- TAG RELEASE_LINK, added by the munger automatically -->
2015-07-16 13:02:26 -04:00
<strong>
2015-11-03 13:17:57 -05:00
The latest release of this document can be found
[here](http://releases.k8s.io/release-1.1/docs/user-guide/identifiers.md).
2015-07-16 13:02:26 -04:00
Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--
2015-07-13 18:15:35 -04:00
2015-07-12 00:04:52 -04:00
<!-- END STRIP_FOR_RELEASE -->
<!-- END MUNGE: UNVERSIONED_WARNING -->
2015-07-17 18:35:41 -04:00
# Identifiers
2015-07-17 18:35:41 -04:00
All objects in the Kubernetes REST API are unambiguously identified by a Name and a UID.
For non-unique user-provided attributes, Kubernetes provides [labels](labels.md) and [annotations](annotations.md).
## Names
2015-07-17 18:35:41 -04:00
2015-07-14 12:37:37 -04:00
Names are generally client-provided. Only one object of a given kind can have a given name at a time (i.e., they are spatially unique). But if you delete an object, you can make a new object with the same name. Names are the used to refer to an object in a resource URL, such as `/api/v1/pods/some-name`. By convention, the names of Kubernetes resources should be up to maximum length of 253 characters and consist of lower case alphanumeric characters, `-`, and `.`, but certain resources have more specific restrictions. See the [identifiers design doc](../design/identifiers.md) for the precise syntax rules for names.
2014-09-08 15:58:44 -04:00
## UIDs
2015-07-17 18:35:41 -04:00
UID are generated by Kubernetes. Every object created over the whole lifetime of a Kubernetes cluster has a distinct UID (i.e., they are spatially and temporally unique).
2015-07-13 20:13:09 -04:00
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
2015-07-14 12:37:37 -04:00
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/identifiers.md?pixel)]()
2015-07-13 20:13:09 -04:00
<!-- END MUNGE: GENERATED_ANALYTICS -->