From 4d83b54ec36da78d9394838213aa2900d2bd3b40 Mon Sep 17 00:00:00 2001 From: Rajesh Deshpande <47311048+rajeshdeshpande02@users.noreply.github.com> Date: Tue, 21 May 2019 11:47:15 +0530 Subject: [PATCH 1/2] Adding annotation example Adding example to show how annotation looks like in manifest. This will help users to understand where exactly we can use the annotations whose details are already given on this page. Annotation `imageregistry: https://hub.docker.com/` used intentionally to make it more relevant as earlier section talk about registry address annotation. --- .../working-with-objects/annotations.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/content/en/docs/concepts/overview/working-with-objects/annotations.md b/content/en/docs/concepts/overview/working-with-objects/annotations.md index cfd08be9190b8..fa8a2bf27d4d4 100644 --- a/content/en/docs/concepts/overview/working-with-objects/annotations.md +++ b/content/en/docs/concepts/overview/working-with-objects/annotations.md @@ -69,6 +69,23 @@ If the prefix is omitted, the annotation Key is presumed to be private to the us The `kubernetes.io/` and `k8s.io/` prefixes are reserved for Kubernetes core components. +For example, the sample Pod with the annotation `imageregistry: https://hub.docker.com/` + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: cuda-test + annotations: + imageregistry: "https://hub.docker.com/" +spec: + containers: + - name: cuda-test + image: "k8s.gcr.io/cuda-vector-add:v0.1" + resources: + limits: + nvidia.com/gpu: 1 +``` {{% /capture %}} {{% capture whatsnext %}} From 18418cf7458feafd970d7f8be9fdb298e6d0ebcb Mon Sep 17 00:00:00 2001 From: Rajesh Deshpande Date: Mon, 3 Jun 2019 19:39:05 +0530 Subject: [PATCH 2/2] Resolving review comments Resolving review comments --- .../overview/working-with-objects/annotations.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/content/en/docs/concepts/overview/working-with-objects/annotations.md b/content/en/docs/concepts/overview/working-with-objects/annotations.md index fa8a2bf27d4d4..7e2446ba5a607 100644 --- a/content/en/docs/concepts/overview/working-with-objects/annotations.md +++ b/content/en/docs/concepts/overview/working-with-objects/annotations.md @@ -69,23 +69,25 @@ If the prefix is omitted, the annotation Key is presumed to be private to the us The `kubernetes.io/` and `k8s.io/` prefixes are reserved for Kubernetes core components. -For example, the sample Pod with the annotation `imageregistry: https://hub.docker.com/` +For example, here’s the configuration file for a Pod that has the annotation `imageregistry: https://hub.docker.com/` : ```yaml + apiVersion: v1 kind: Pod metadata: - name: cuda-test + name: annotations-demo annotations: imageregistry: "https://hub.docker.com/" spec: containers: - - name: cuda-test - image: "k8s.gcr.io/cuda-vector-add:v0.1" - resources: - limits: - nvidia.com/gpu: 1 + - name: nginx + image: nginx:1.7.9 + ports: + - containerPort: 80 + ``` + {{% /capture %}} {{% capture whatsnext %}}