{"id":5134,"date":"2018-08-10T09:21:50","date_gmt":"2018-08-10T09:21:50","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=5134"},"modified":"2021-02-27T09:07:02","modified_gmt":"2021-02-27T09:07:02","slug":"what-is-annotations-in-kubernetes","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/","title":{"rendered":"What is Annotations in Kubernetes?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5143\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy.png\" alt=\"\" width=\"600\" height=\"315\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy-300x158.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p class=\"p1\">What is Annotations in Kubernetes?<\/p>\n<p class=\"p1\">There are two way using you can attach metadata to Kubernetes objects.<\/p>\n<ol class=\"ol1\">\n<li class=\"li1\">labels<\/li>\n<li class=\"li1\">annotations<\/li>\n<\/ol>\n<p class=\"p1\">Kubernetes annotations is used to attach arbitrary non-identifying metadata to objects. Clients such as tools and libraries can retrieve this metadata.<\/p>\n<p class=\"p1\">In contrast, annotations are not used to identify and select objects. The metadata in an annotation can be small or large, structured or unstructured, and can include characters not permitted by labels.<\/p>\n<p class=\"p1\">Annotations, like labels, are key\/value maps:<\/p>\n<p class=\"p1\">apiVersion: extensions\/v1beta1<\/p>\n<p class=\"p1\">kind: Deployment<\/p>\n<p class=\"p1\">metadata:<\/p>\n<p class=\"p1\"><span class=\"Apple-converted-space\">\u00a0 <\/span>annotations:<\/p>\n<p class=\"p1\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>kompose.cmd: .\/kompose convert<\/p>\n<p class=\"p1\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>kompose.version: &#8220;&#8221;<\/p>\n<p><strong>FORMAT<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">&quot;metadata&quot;: {&lt;\/p&gt;\r\n&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;\u00a0 &lt;\/span&gt;&quot;annotations&quot;: {&lt;\/p&gt;\r\n&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;\u00a0 \u00a0 &lt;\/span&gt;&quot;key1&quot; : &quot;value1&quot;,&lt;\/p&gt;\r\n&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;\u00a0 \u00a0 &lt;\/span&gt;&quot;key2&quot; : &quot;value2&quot;&lt;\/p&gt;\r\n&lt;p class=&quot;p1&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;\u00a0 &lt;\/span&gt;}&lt;\/p&gt;\r\n&lt;p class=&quot;p1&quot;&gt;}&lt;\/p&gt;\r\n<\/pre>\n<p class=\"p1\">Here are some examples of information that could be recorded in annotations:<\/p>\n<ol class=\"ol1\">\n<li class=\"li1\">Build, release, or image information like timestamps, release IDs, git branch, PR numbers, image hashes, and registry address.<\/li>\n<li class=\"li1\">Pointers to logging, monitoring, analytics, or audit repositories.<\/li>\n<\/ol>\n<p class=\"p1\">More<\/p>\n<p class=\"p4\"><a href=\"https:\/\/kubernetes.io\/docs\/concepts\/overview\/working-with-objects\/annotations\/\">https:\/\/kubernetes.io\/docs\/concepts\/overview\/working-with-objects\/annotations\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Annotations in Kubernetes? There are two way using you can attach metadata to Kubernetes objects. labels annotations Kubernetes [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":5143,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4859],"tags":[4990,4860,4991],"class_list":["post-5134","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","tag-annotations","tag-kubernetes","tag-labels"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is Annotations in Kubernetes? - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Annotations in Kubernetes? - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"What is Annotations in Kubernetes? There are two way using you can attach metadata to Kubernetes objects. labels annotations Kubernetes [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-10T09:21:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:07:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"315\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"What is Annotations in Kubernetes?\",\"datePublished\":\"2018-08-10T09:21:50+00:00\",\"dateModified\":\"2021-02-27T09:07:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/\"},\"wordCount\":259,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/kubernetes-copy.png\",\"keywords\":[\"Annotations\",\"kubernetes\",\"labels\"],\"articleSection\":[\"Kubernetes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/\",\"name\":\"What is Annotations in Kubernetes? - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/kubernetes-copy.png\",\"datePublished\":\"2018-08-10T09:21:50+00:00\",\"dateModified\":\"2021-02-27T09:07:02+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/kubernetes-copy.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/kubernetes-copy.png\",\"width\":600,\"height\":315},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-annotations-in-kubernetes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Annotations in Kubernetes?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Annotations in Kubernetes? - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/","og_locale":"en_US","og_type":"article","og_title":"What is Annotations in Kubernetes? - scmGalaxy","og_description":"What is Annotations in Kubernetes? There are two way using you can attach metadata to Kubernetes objects. labels annotations Kubernetes [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/","og_site_name":"scmGalaxy","article_published_time":"2018-08-10T09:21:50+00:00","article_modified_time":"2021-02-27T09:07:02+00:00","og_image":[{"width":600,"height":315,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"What is Annotations in Kubernetes?","datePublished":"2018-08-10T09:21:50+00:00","dateModified":"2021-02-27T09:07:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/"},"wordCount":259,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy.png","keywords":["Annotations","kubernetes","labels"],"articleSection":["Kubernetes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/","name":"What is Annotations in Kubernetes? - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy.png","datePublished":"2018-08-10T09:21:50+00:00","dateModified":"2021-02-27T09:07:02+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2018\/08\/kubernetes-copy.png","width":600,"height":315},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-annotations-in-kubernetes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"What is Annotations in Kubernetes?"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=5134"}],"version-history":[{"count":3,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5134\/revisions"}],"predecessor-version":[{"id":5145,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5134\/revisions\/5145"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/5143"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=5134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=5134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=5134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}