Files
Rajesh Deshpande 5a4b7a38bc Adding pod configuration file with names (#14971)
Adding pod configuration file with pod and container name. This explains the usage of names and how it looks like in actual YAML.
2019-06-19 12:10:33 -07:00

1.2 KiB
Raw Permalink Blame History

reviewers, title, content_template, weight
reviewers title content_template weight
mikedanese
thockin
Names templates/concept 20

{{% capture overview %}}

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 and annotations.

See the identifiers design doc for the precise syntax rules for Names and UIDs.

{{% /capture %}}

{{% capture body %}}

Names

{{< glossary_definition term_id="name" length="all" >}}

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.

For example, heres the configuration file with a Pod name as nginx-demo and a Container name as nginx:

apiVersion: v1
kind: Pod
metadata:
  name: nginx-demo
spec:
  containers:
  - name: nginx
    image: nginx:1.7.9
    ports:
    - containerPort: 80

UIDs

{{< glossary_definition term_id="uid" length="all" >}}

{{% /capture %}}