{"id":303361,"date":"2021-07-20T12:00:44","date_gmt":"2021-07-20T09:00:44","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it\/"},"modified":"2021-07-20T12:00:44","modified_gmt":"2021-07-20T09:00:44","slug":"how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it\/","title":{"rendered":"#How to Upgrade DigitalOcean Managed Kubernetes Clusters \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a3894b9671d3\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a3894b9671d3\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it\/#Types_of_Update\" >Types of Update<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it\/#Setting_Your_Update_Schedule\" >Setting Your Update Schedule<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it\/#Updating_Manually\" >Updating Manually<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it\/#Updating_From_the_CLI\" >Updating From the CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it\/#Surge_Upgrades\" >Surge Upgrades<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-upgrade-digitalocean-managed-kubernetes-clusters-cloudsavvy-it\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Upgrade DigitalOcean Managed Kubernetes Clusters \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage aligncenter size-full wp-image-8934\" srcset=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/01\/83680385.jpeg?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/01\/83680385.jpeg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" sizes=\"auto, 400w, 1200w\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/01\/83680385.jpeg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"DigitalOcean logo\" width=\"1600\" height=\"900\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>DigitalOcean\u2019s Managed Kubernetes Service (DOKS) makes it quick and easy to get production-ready clusters running in the cloud. When you create a cluster, you can pick from the three latest Kubernetes minor releases. Here\u2019s how to handle updates so you don\u2019t get left behind on new features and security patches.<\/p>\n<h2 id=\"types-of-update\"><span class=\"ez-toc-section\" id=\"Types_of_Update\"><\/span>Types of Update<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You\u2019ll encounter two different kinds of Kubernetes update as you operate your cluster:<\/p>\n<ul>\n<li><strong>Patch releases<\/strong> \u2013 These bump the patch number in the semantic versioning scheme, such as 1.20.1 to 1.20.2. Patch updates should always be safe to update to, with no deprecations or breaking changes.<\/li>\n<li><strong>Minor releases<\/strong> \u2013 A minor release involves a feature bump, such as 1.20 to 1.21. These changes should still be backwards-compatible, so you won\u2019t run into any im<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/social-mediaa\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Social Media\" target=\"_blank\" rel=\"noopener\">media<\/a>te problems. Some features could be deprecated in a minor release for removal in a future major (1.x to 2.x).<\/li>\n<\/ul>\n<p>For both patch and minor releases, DigitalOcean offers an automatic upgrade service which will take action on your behalf. Updates will be installed during a preset maintenance window. Minor updates aren\u2019t <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>lied unless you manually enable a cluster-level option first.<\/p>\n<p>DigitalOcean could sometimes force through an update in the event of an urgent security issue. This can happen <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.digitalocean.com\/products\/kubernetes\/how-to\/upgrade-cluster\">even if you\u2019ve disabled<\/a> automatic updates. In addition, your cluster will eventually be upgraded if you stay on the oldest supported Kubernetes version for so long that DigitalOcean discontinues it entirely.<\/p>\n<p>Upgrades are a two-step process. First the Kubernetes control plane is updated, during which your workloads remain available. Your worker nodes are then patched to the new release. This can cause downtime depending on the size of your cluster and its workloads.<\/p>\n<h2 id=\"setting-your-update-schedule\"><span class=\"ez-toc-section\" id=\"Setting_Your_Update_Schedule\"><\/span>Setting Your Update Schedule<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Your cluster\u2019s automatic update schedule is set within the DigitalOcean control panel. Log into your account and click your cluster on the homepage. You can also click \u201cKubernetes\u201d in the left sidebar and choose your cluster from there.<\/p>\n<p>\u00a0<\/p>\n<p>Once you\u2019re on your cluster page, click the \u201cSettings\u201d tab at the top. Click the \u201cEdit\u201d button next to the \u201cUpgrade window\u201d category. Use the two dropdowns to choose a day and time. Click \u201cSave\u201d to confirm your selection. DigitalOcean will schedule automatic upgrades to install during a four hour period starting from the set time.<\/p>\n<p><span style=\"text-decoration: underline;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12731\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/582c407f.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1268\" height=\"648\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/span><\/p>\n<p>If you want Kubernetes minor releases to be applied automatically too, click the \u201cEdit\u201d button next to \u201cAutomatically upgrade minor version patches.\u201d When the checkbox is ticked, your cluster will move to new minor versions without any manual intervention. You should evaluate this decision against the minimum stability you need for your workloads.<\/p>\n<h2 id=\"updating-manually\"><span class=\"ez-toc-section\" id=\"Updating_Manually\"><\/span>Updating Manually<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can always upgrade your cluster manually from within the cloud control panel. You\u2019ll need to do this when you take a minor version upgrade and you\u2019ve not got the automatic option enabled. A manual upgrade is also useful if you want to install a patch ahead of your usual schedule.<\/p>\n<p>Navigate to your cluster in the control panel. Scroll down on the \u201cOverview\u201d tab and click the blue \u201cView Available Upgrade\u201d button. If this button isn\u2019t displayed, your cluster\u2019s already updated and no further patches are available.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12727\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/781b7c6f.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1278\" height=\"908\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>If you\u2019re upgrading to a new minor version, DigitalOcean will lint your cluster\u2019s resources to discover any potential compatibility issues. This check could take a few moments to complete. You\u2019ll see the results displayed in the popup window.<\/p>\n<p>Any linting issues should be resolved before you proceed with the update. Although minor Kubernetes updates shouldn\u2019t present serious backwards compatibility issues, upgrades also involve changes to the underlying DOKS platform. DigitalOcean sometimes adjusts DOKS configuration in ways which could introduce upgrade blocks for older versions.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12730\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/29635117.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1320\" height=\"738\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>If the lint fails, you should refer to <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.digitalocean.com\/products\/kubernetes\/resources\/clusterlint-errors\">DigitalOcean\u2019s documentation<\/a> as the resolution steps will differ from cluster to cluster. DigitalOcean\u2019s linting reference includes step-by-step \u201chow to fix\u201d instructions for the most common issues. When you\u2019re done, click \u201cRe-run check\u201d to confirm your fixes are effective.<\/p>\n<p>Once the lint\u2019s passed, click the blue \u201cUpgrade Now\u201d button to commence the update. This may take several minutes depending on the size of your cluster. Progress is shown within the Control Panel UI. The Control Plane gets updated first, followed by each worker node in your cluster.<\/p>\n<h2 id=\"updating-from-the-cli\"><span class=\"ez-toc-section\" id=\"Updating_From_the_CLI\"><\/span>Updating From the CLI<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can automate updates within your own infrastructure by using DigitalOcean\u2019s CLI, Doctl. Make sure you\u2019ve got Doctl installed and connected to your account.<\/p>\n<p>First get the details of your cluster:<\/p>\n<pre>doctl kubernetes cluster list<\/pre>\n<p>This command displays all your clusters. Note down the ID of the cluster you want to update.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12728\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/b55f3d61.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"972\" height=\"132\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Next, find the Kubernetes versions which your cluster can migrate to:<\/p>\n<pre>doctl kubernetes cluster get-upgrades &lt;ID&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12732\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/339d4117.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"932\" height=\"122\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><br \/>Replace <code>&lt;ID&gt;<\/code> with the cluster ID you noted earlier. Now you know the versions you can use, run the <code>upgrade<\/code> command to start the patch:<\/p>\n<pre>doctl kubernetes cluster upgrade &lt;ID&gt; --version 1.20.8<\/pre>\n<p>If you want to move directly to the latest release, you can omit the <code>--version<\/code> flag.<\/p>\n<p>The upgrade process could take several minutes to complete, just like an installation initiated via the web UI.<\/p>\n<h2 id=\"surge-upgrades\"><span class=\"ez-toc-section\" id=\"Surge_Upgrades\"><\/span>Surge Upgrades<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Updating a cluster with a single node used to cause downtime. Nodes are replaced with new instances during the update process, so there would be a period where your workloads went offline. When your cluster\u2019s got multiple nodes, the Kubernetes scheduler will move Pods off each upgrading node to maintain availability. You may still encounter downtime if your cluster\u2019s capacity can\u2019t support all your workloads when running \u201ca node down.\u201d<\/p>\n<p>Surge Upgrades are an optional feature which let you guarantee availability during updates, even on single node clusters. When Surge Upgrades are active, DigitalOcean will spin up extra worker nodes ahead of the patch installation. Pods will be moved onto the temporary \u201csurge\u201d nodes while the cluster upgrade is completed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12729\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/07\/371428f6.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1328\" height=\"908\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>A maximum of 10 surge nodes will be added to your account. These will be billed at the regular droplet rate. For most clusters, the cost impact should be negligible, as the extra droplets will only live for the duration of the update.<\/p>\n<p>You can activate Surge Upgrades within your cluster\u2019s Settings page. Once turned on, they\u2019ll be used for all future updates, both automated and manual. The Surge Upgrades option is also shown in the confirmation prompt when you\u2019re about to commence a manual update.<\/p>\n<h2 id=\"conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You\u2019ve got several options for updating DigitalOcean Kubernetes clusters. It\u2019s usually best to let patch updates get applied automatically, while minor releases can be automated or installed manually with the Cloud Control Panel or Doctl.<\/p>\n<p>Updates shouldn\u2019t cause any downtime for your users provided you\u2019ve got Surge Upgrades enabled. DigitalOcean will automatically create new worker nodes to maintain service availability while the main nodes are updated. If you\u2019re not using Surge Upgrades, you may encounter downtime if you\u2019re using a single-node cluster or you\u2019re left with insufficient capacity as each node drops out to be updated.\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/12718\/how-to-upgrade-digitalocean-managed-kubernetes-clusters\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Upgrade DigitalOcean Managed Kubernetes Clusters \u2013 CloudSavvy IT&#8221; DigitalOcean\u2019s Managed Kubernetes Service (DOKS) makes it quick and easy to get production-ready clusters running in the cloud. When you create a cluster, you can pick from the three latest Kubernetes minor releases. Here\u2019s how to handle updates so you don\u2019t get left behind on&#8230;<\/p>\n","protected":false},"author":1,"featured_media":303362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/01\/83680385.jpeg","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-303361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/303361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=303361"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/303361\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/303362"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=303361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=303361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=303361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}