From 5a4b7a38bca186764f6c178ed9bce810c96df840 Mon Sep 17 00:00:00 2001 From: Rajesh Deshpande Date: Thu, 20 Jun 2019 00:40:33 +0530 Subject: [PATCH] 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. --- .../overview/working-with-objects/names.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/en/docs/concepts/overview/working-with-objects/names.md b/content/en/docs/concepts/overview/working-with-objects/names.md index 7499a96a66e91..dffff2d1a7b9f 100644 --- a/content/en/docs/concepts/overview/working-with-objects/names.md +++ b/content/en/docs/concepts/overview/working-with-objects/names.md @@ -26,6 +26,21 @@ See the [identifiers design doc](https://git.k8s.io/community/contributors/desig 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, here’s the configuration file with a Pod name as `nginx-demo` and a Container name as `nginx`: + +```yaml +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" >}}