{"id":20591,"date":"2021-03-24T08:34:51","date_gmt":"2021-03-24T08:34:51","guid":{"rendered":"http:\/\/www.devopsschool.com\/blog\/?p=20591"},"modified":"2025-01-23T12:45:32","modified_gmt":"2025-01-23T12:45:32","slug":"explained-kubernetes-daemonset-with-example","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/explained-kubernetes-daemonset-with-example\/","title":{"rendered":"Explained Kubernetes DaemonSet with Example"},"content":{"rendered":"\n<p><strong>Creating a Kubernetes DaemonSet<\/strong><\/p>\n\n\n\n<p><strong>Let\u2019s use a simple&nbsp;<code>DaemonSet<\/code>&nbsp;for Apache HTTP server to illustrate this<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">apiVersion: apps\/v1\nkind: DaemonSet\nmetadata:\n  name: logging\nspec:\n  selector:\n    matchLabels:\n      app: httpd-logging\n  template:\n    metadata:\n      labels:\n        app: httpd-logging\n    spec:\n      containers:\n        - name: webserver\n          image: httpd\n          ports:\n          - containerPort: 80<\/code><\/span><\/pre>\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\"><\/code><\/span><\/pre>\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/2d3662abd3f8bc680ce0dcb71d1e58f4.js\"><\/script>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_15159\"><iframe loading=\"lazy\"  id=\"_ytid_38873\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_15159\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Creating a Kubernetes DaemonSet Let\u2019s use a simple&nbsp;DaemonSet&nbsp;for Apache HTTP server to illustrate this<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4859],"tags":[],"class_list":["post-20591","post","type-post","status-publish","format-standard","hentry","category-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=20591"}],"version-history":[{"count":7,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20591\/revisions"}],"predecessor-version":[{"id":48279,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20591\/revisions\/48279"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=20591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=20591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=20591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}