Skip to content

Commit

Permalink
Adding annotation example (#14440)
Browse files Browse the repository at this point in the history
* 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.

* Resolving review comments

Resolving review comments
  • Loading branch information
rajeshdeshpande02 authored and k8s-ci-robot committed Jun 6, 2019
1 parent 7166553 commit 1646be8
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +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, here’s the configuration file for a Pod that has the annotation `imageregistry: https://hub.docker.com/` :

```yaml

apiVersion: v1
kind: Pod
metadata:
name: annotations-demo
annotations:
imageregistry: "https://hub.docker.com/"
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80

```
{{% /capture %}}
{{% capture whatsnext %}}
Expand Down

0 comments on commit 1646be8

Please sign in to comment.