{"id":17606,"date":"2022-04-28T09:30:00","date_gmt":"2022-04-28T07:30:00","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=17606"},"modified":"2022-04-27T15:12:10","modified_gmt":"2022-04-27T13:12:10","slug":"generating-a-kubernetes-manifest-with-dekorate-the-easy-way","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/","title":{"rendered":"Generating a Kubernetes Manifest with Dekorate the Easy Way"},"content":{"rendered":"\t\t\t\t<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-a16cf0f3      \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t>\n\t\t\t\t<div class=\"uagb-toc__wrap\">\n\t\t\t\t\t\t<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\tTable Of Contents\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uagb-toc__list-wrap \">\n\t\t\t\t\t\t<ol class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#what-is-dekorate\" class=\"uagb-toc-link__trigger\">What is Dekorate?<\/a><ul class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#dekorate-features\" class=\"uagb-toc-link__trigger\">Dekorate Features<\/a><\/li><\/ul><\/li><li class=\"uagb-toc__list\"><a href=\"#generating-a-kubernetes-manifest-via-annotation-processing\" class=\"uagb-toc-link__trigger\">Generating a Kubernetes Manifest via Annotation Processing<\/a><ul class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#configuring-the-kubernetes-manifest\" class=\"uagb-toc-link__trigger\">Configuring the Kubernetes Manifest<\/a><li class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#rich-framework-integration\" class=\"uagb-toc-link__trigger\">Rich Framework Integration<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"uagb-toc__list\"><a href=\"#how-the-code-looks\" class=\"uagb-toc-link__trigger\">How the Code Looks<\/a><ul class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#hello-world-example\" class=\"uagb-toc-link__trigger\">Hello World Example<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><li class=\"uagb-toc__list\"><a href=\"#use-cases-where-dekorate-will-help-you\" class=\"uagb-toc-link__trigger\">Use Cases Where Dekorate Will Help You<\/a><\/ul><\/ul><\/ul><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\n\n<p>Why use <strong>Dekorate for a Kubernetes manifest<\/strong>? Well, the practice of deploying applications has seen a lot of changes in the relatively short time that computer systems have been part of our daily lives and business operations. One of the latest significant shifts in the deployment of applications is <strong>the move to containers<\/strong>.<\/p>\n\n\n\n<p>Using <strong>containers<\/strong>\u2014rather than dedicated physical servers or virtual machines\u2014makes the underlying system <strong>more lightweight and portable<\/strong> than the previous methods.<br><br>Of course, containers need to be properly organised and managed if this system is to work to its full potential\u2014or, indeed, at all\u2014<strong>and that\u2019s where <a href=\"https:\/\/www.codemotion.com\/magazine\/backend-dev\/kubernetes-monitoring\/\" target=\"_blank\" aria-label=\"Kubernetes comes in (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">Kubernetes comes in<\/a><\/strong>. Kubernetes is a framework to run distributed systems, taking care of several aspects of the process, such as scaling and failover. It allows for the bundling of applications, as well as deployment patterns.<br>Even with such an agile system, setting things up and making changes once things are up and running can be a tedious venture. <strong>Editing XML, YAML, or JSON files manually is a time-consuming way of doing things<\/strong>, and one that invites the possibility of human error. Dekorate takes care of this aspect for you.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-dekorate\">What is Dekorate?<\/h2>\n\n\n\n<p>Dekorate is a collection of Java compile-time generators and decorators designed to work with Kubernetes (and OpenShift) manifests. The purpose of this tool is to make <strong>generating Kubernetes manifests much easier and faster by reducing the process <\/strong>of adding a dependency to the classpath. It also makes customising things easier by reducing that process to setting annotations or application properties.<br><br>It <strong>works with almost any Java build tool<\/strong>, including Gradle, Maven, Bazel, and sbt. Lightweight integration with build tools, making it an incredibly versatile solution for saving time when setting up or modifying application deployments. It allows for the manifests to be customised through annotation or properties, so developers and system admins can use the method that best suits them and the application.<br><br>This is an \u201cout of the box\u201d solution that includes <strong>framework detection<\/strong>. This means that, in the vast majority of situations, very little (if any) customisation to a specific system is required.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-dekorate-features\">Dekorate Features<\/h3>\n\n\n\n<p>Dekorate boasts several time-saving features that make it worthwhile when working with Kubernetes manifests. These include;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Allows fine-grained customisation:<\/strong> When opting for convenience, it is often the case that one has to sacrifice some of the control they previously had. For example, using a high-level programming language may be easier, but low-level languages are more powerful. In the case of this tool, admins will still have fine-grained customisation options through annotations, properties, or both. Essentially, it removes a substantial chunk of work without taking the control away.<br><\/li><li><strong>Works for most build tools and all jvm languages:<\/strong> This tool works with almost any Java build tool (including all of the major ones) and all jvm languages. It provides lightweight integration with those build tools and can refer to information from the build tool config without needing to bring the build tool itself into the classpath.<br><\/li><li><strong>Can be used as a library:<\/strong> It is possible to use Dekorate as a library for manipulating Kubernetes manifests, allowing for more bespoke integration when needed.<br><\/li><li><strong>Framework detection:<\/strong> Dekorate can automatically detect Java frameworks such as Quarkus, Thorntail, and Springboot. In doing so, it can align the generated manifests accordingly, making it a true \u201cout of the box\u201d experience.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"629\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/Foto-Code-2-1024x629.jpg\" alt=\"kubernetes, dekorate, java, kubernetes manifest\" class=\"wp-image-17546\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/Foto-Code-2-1024x629.jpg 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/Foto-Code-2-300x184.jpg 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/Foto-Code-2-768x472.jpg 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/Foto-Code-2-1536x943.jpg 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/Foto-Code-2-2048x1258.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Dekorate can detect Java Frameworks.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-generating-a-kubernetes-manifest-via-annotation-processing\">Generating a Kubernetes Manifest via Annotation Processing<\/h2>\n\n\n\n<p>Generating a Kubernetes manifests using this tool is incredibly simple. Here we will go over the process of getting started.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-configuring-the-kubernetes-manifest\">Configuring the Kubernetes Manifest<\/h3>\n\n\n\n<p>The simplest way to get Dekorate enabled is to add the JAR file that corresponds to the target platform file to the class path. In the case of Kubernetes users, this would look something like this;<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">dependency&gt;\ngroupId io.dekorate \/groupId\ngroupId kuberentes-annotations \/groupId\nversion 0.13.2 \/groupId\n\/dependency<\/code><\/span><\/pre>\n\n\n<p>The code for Openshift users would be almost identical save for the fact that the groupID value would be \u201ckubernetes-spring-starter\u201d. For Spring Boot, it would be \u201copenshift-spring-starter\u201d.<br>This will cause the tool to be triggered by the compiler during the compilation process, and that will generate the desired manifests under <strong>target\/classes\/META-INF\/dekorate<\/strong>. Once created, these manifests can be applied directly to the cluster in order to deploy the application.<br><br>The manifests will contain a basic deployment resource, but may also contain additional configurations and resources depending on what Dekorate detected in your code. One example of this is the HTTP port being added to the container and exposed as a service if an HTTP endpoint is detected in your code.<br><br>Using annotations allows the user to specify almost anything related to the deployment manifest, including ports, environment variables, annotations and labels, and more. This is a much more efficient method than creating or editing long XML, YAML, or JSON files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-rich-framework-integration\">Rich Framework Integration<\/h3>\n\n\n\n<p>It was mentioned above that there is lightweight integration with frameworks like Maven and Gradle. This feature means that it can bring in information from the tool configuration without having to bring the build tool into the classpath.<br><br>Integration with <strong>application frameworks like Spring Boot<\/strong> further enhances the appeal of Dekorate, especially with frameworks that provide native resource generation for Kubernetes that is based on this tool. One such framework is Quarkus.<br><br>Quarkus delivers its own extension for Kubernetes but makes use of Dekorate to customise the generated manifests. This is done after Quarkus has retrieved as much information as it can for the applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-the-code-looks\">How the Code Looks<\/h2>\n\n\n\n<p>Given that the sole purpose of this tool is to generate Kubernetes manifests, it shouldn\u2019t be surprising that the resulting code is clean and accessible. Should a developer ever want or need to go into the manifests to read or edit them manually, they will not need to worry about being able to understand the generated code.<br><br>Of course, the labels in a Kubernetes manifest are generally self-explanatory, but this tool ensures that everything is correctly indented according to hierarchy, and that line breaks are used to separate out individual sections and make it easier to navigate through the code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-hello-world-example\">Hello World Example<\/h3>\n\n\n\n<p>No article about a programming language, framework, or development tool would be complete without a \u201chello world\u201d-level introduction on how to use it. In this case, hello world will be different depending on the framework that is in play, but those differences are not significant. For example, in Quarkus you would add the following dependency to your project;<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">dependency\ngroupId io.quarkus \/groupId\nartifactId quarkus-kubernetes \/artifactId\nversion <span class=\"hljs-number\">1.0<\/span><span class=\"hljs-number\">.0<\/span>.<span class=\"hljs-keyword\">Final<\/span> \/version\n\/dependency<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Then, once the project has been built, you would find the generated manifests under <strong>target\/kubernetes<\/strong>. For Spring Boot, you would add the following dependency;<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">dependency\ngroupId io.dekorate \/groupId\nartifactId kubernetes-spring-starter \/artifactId\nversion 2.9.2 \/version\n\/dependency<\/code><\/span><\/pre>\n\n\n<p>And the resulting manifest would be found under <strong>target\/classes\/META-INF\/dekorate<\/strong>. Details on the other frameworks like Thorntail can be found on <a href=\"https:\/\/github.com\/dekorateio\/dekorate\">Dektorio\u2019s Github page<\/a>.<br>Of course, not all deployments make use of frameworks like Spring Boot. For generic Java projects, the process is basically the same, but there also needs to be an annotation that expresses an intent to enable the tool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-use-cases-where-dekorate-will-help-you\">Use Cases Where Dekorate Will Help You<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/afdda858-ab17-41fb-bd27-3ed669d057d9-2-1024x576.png\" alt=\"Kubernetes, containers, manifest, Dekorate\" class=\"wp-image-17462\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/afdda858-ab17-41fb-bd27-3ed669d057d9-2-1024x576.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/afdda858-ab17-41fb-bd27-3ed669d057d9-2-300x169.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/afdda858-ab17-41fb-bd27-3ed669d057d9-2-768x432.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/afdda858-ab17-41fb-bd27-3ed669d057d9-2-1536x864.png 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/afdda858-ab17-41fb-bd27-3ed669d057d9-2-896x504.png 896w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/afdda858-ab17-41fb-bd27-3ed669d057d9-2-400x225.png 400w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/afdda858-ab17-41fb-bd27-3ed669d057d9-2.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Dekorate can help to create a Kubernetes Manifest easily.<\/figcaption><\/figure>\n\n\n\n<p>Dekorate is useful in almost any container-based app deployment because reduces the work involved in that deployment, not to mention the continued maintenance of it. The fact that it features <strong>automatic framework detection<\/strong> and works out of the box with most build tools only adds to that convenience. And, like all good tools of convenience, it allows developers to put as much or as little effort in as they wish. It can be used to set up a project with the minimum possible effort, but it a developer can also dive into the project and make fine fine-grained changes without fighting against the tool that is supposed to be saving them time.<br><br>There is a public roadmap for future features, and already provides a good deal of integration modules and extensions. The popularity already of what is, ultimately, a very new project, makes it highly likely that this tool will continue to improve and expand its feature set. And, as it does, the <strong>developers of frameworks will be more inclined to make their tools work better with it<\/strong>, even incorporating it as Quarkus has done.<br><br>Ultimately, this is a tool of convenience. And, while tools of convenience aren\u2019t always necessary, it is a tool that does not hamstring developers by taking control out of their hands, meaning there is very little downside to adopting it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why use Dekorate for a Kubernetes manifest? Well, the practice of deploying applications has seen a lot of changes in the relatively short time that computer systems have been part of our daily lives and business operations. One of the latest significant shifts in the deployment of applications is the move to containers. Using containers\u2014rather&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/\">Read more<\/a><\/p>\n","protected":false},"author":64,"featured_media":17631,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":6,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[36],"tags":[3357,52,56],"collections":[],"class_list":{"0":"post-17606","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-backend","8":"tag-iot","9":"tag-java","10":"tag-kubernetes","11":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How To Create a Kubernetes Manifest With Dekorate - Codemotion<\/title>\n<meta name=\"description\" content=\"Here are some easy code snippets for getting your Kubernetes Manifest done in no time with Dekorate. Read on to discover more tips\" \/>\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.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generating a Kubernetes Manifest with Dekorate the Easy Way\" \/>\n<meta property=\"og:description\" content=\"Here are some easy code snippets for getting your Kubernetes Manifest done in no time with Dekorate. Read on to discover more tips\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-28T07:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Codemotion\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Codemotion\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/\"},\"author\":{\"name\":\"Codemotion\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/201bb98b02412383686cced7521b861c\"},\"headline\":\"Generating a Kubernetes Manifest with Dekorate the Easy Way\",\"datePublished\":\"2022-04-28T07:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/\"},\"wordCount\":1406,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png\",\"keywords\":[\"IoT\",\"Java\",\"Kubernetes\"],\"articleSection\":[\"Backend\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/\",\"name\":\"How To Create a Kubernetes Manifest With Dekorate - Codemotion\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png\",\"datePublished\":\"2022-04-28T07:30:00+00:00\",\"description\":\"Here are some easy code snippets for getting your Kubernetes Manifest done in no time with Dekorate. Read on to discover more tips\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png\",\"width\":1920,\"height\":1080,\"caption\":\"How to generate a kubernetes manifest with dekorate\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backend\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/backend\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Generating a Kubernetes Manifest with Dekorate the Easy Way\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/201bb98b02412383686cced7521b861c\",\"name\":\"Codemotion\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png\",\"caption\":\"Codemotion\"},\"description\":\"Articles wirtten by the Codemotion staff. Tech news, inspiration, latest treends in software development and more.\",\"sameAs\":[\"https:\/\/x.com\/CodemotionIT\"],\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How To Create a Kubernetes Manifest With Dekorate - Codemotion","description":"Here are some easy code snippets for getting your Kubernetes Manifest done in no time with Dekorate. Read on to discover more tips","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.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/","og_locale":"en_US","og_type":"article","og_title":"Generating a Kubernetes Manifest with Dekorate the Easy Way","og_description":"Here are some easy code snippets for getting your Kubernetes Manifest done in no time with Dekorate. Read on to discover more tips","og_url":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2022-04-28T07:30:00+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png","type":"image\/png"}],"author":"Codemotion","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Codemotion","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/"},"author":{"name":"Codemotion","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/201bb98b02412383686cced7521b861c"},"headline":"Generating a Kubernetes Manifest with Dekorate the Easy Way","datePublished":"2022-04-28T07:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/"},"wordCount":1406,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png","keywords":["IoT","Java","Kubernetes"],"articleSection":["Backend"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/","url":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/","name":"How To Create a Kubernetes Manifest With Dekorate - Codemotion","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png","datePublished":"2022-04-28T07:30:00+00:00","description":"Here are some easy code snippets for getting your Kubernetes Manifest done in no time with Dekorate. Read on to discover more tips","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png","width":1920,"height":1080,"caption":"How to generate a kubernetes manifest with dekorate"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/generating-a-kubernetes-manifest-with-dekorate-the-easy-way\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"Backend","item":"https:\/\/www.codemotion.com\/magazine\/backend\/"},{"@type":"ListItem","position":3,"name":"Generating a Kubernetes Manifest with Dekorate the Easy Way"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/201bb98b02412383686cced7521b861c","name":"Codemotion","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png","caption":"Codemotion"},"description":"Articles wirtten by the Codemotion staff. Tech news, inspiration, latest treends in software development and more.","sameAs":["https:\/\/x.com\/CodemotionIT"],"url":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-600x400.png","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-600x600.png","author_info":{"display_name":"Codemotion","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png",1920,1080,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-150x150.png",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-300x169.png",300,169,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-768x432.png",768,432,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-1024x576.png",1024,576,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-1536x864.png",1536,864,true],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png",1920,1080,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1.png",100,56,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-180x128.png",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-896x504.png",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-400x225.png",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-600x400.png",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/04\/f8b6c775-b78f-4b08-b58f-0d5a1b34f473-1-600x600.png",600,600,true]},"uagb_author_info":{"display_name":"Codemotion","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"},"uagb_comment_info":0,"uagb_excerpt":"Why use Dekorate for a Kubernetes manifest? Well, the practice of deploying applications has seen a lot of changes in the relatively short time that computer systems have been part of our daily lives and business operations. One of the latest significant shifts in the deployment of applications is the move to containers. Using containers\u2014rather&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/17606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=17606"}],"version-history":[{"count":3,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/17606\/revisions"}],"predecessor-version":[{"id":17634,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/17606\/revisions\/17634"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/17631"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=17606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=17606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=17606"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=17606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}