{"id":1255,"date":"2020-08-28T13:52:24","date_gmt":"2020-08-28T20:52:24","guid":{"rendered":"http:\/\/blog.nillsf.com\/?p=1255"},"modified":"2020-08-28T13:52:33","modified_gmt":"2020-08-28T20:52:33","slug":"running-kind-in-windows","status":"publish","type":"post","link":"https:\/\/blog.nillsf.com\/index.php\/2020\/08\/28\/running-kind-in-windows\/","title":{"rendered":"Running kind in Windows"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Recently, I wrote a blog about how to run kind to run local Kubernetes cluster In that post I installed kind on my WSL setup. Kind &#8211; or Kubernetes in Docker &#8211; is a way to run local Kubernetes clusters easily and quickly. In this post, I&#8217;ll explore how to setup kind on a Windows system, from scratch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Quick side-track on Windows 10 Home vs Windows 10 Pro<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The default Docker Desktop installation will use Hyper-V to run Linux containers. Hyper-V is only included in Windows 10 Pro, not in Windows 10 Home. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can run Docker Desktop in Windows 10 home, by using the WSL2 backend. Since the setup of WSL2 is outside of the scope of this blog, I&#8217;ll be focused on Windows 10 pro and running Docker Desktop using the Hyper-V containers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I created a fresh new windows 10 Pro VM in Azure. You don&#8217;t have to run this on a VM, you should be able to run this on your regular Windows machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In terms of prerequisites, we&#8217;ll need the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Docker (Desktop)<\/li><li>Go<\/li><li>Kubectl (installed through Docker Desktop)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To automate most of this, and to make installation easier, I&#8217;ll use the chocolatey package manager to do most of the work. To install chocolatey, you can run the following command in an Admin PowerShell window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-ExecutionPolicy Bypass -Scope Process -Force; &#91;System.Net.ServicePointManager]::SecurityProtocol = &#91;System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https:\/\/chocolatey.org\/install.ps1'))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"867\" height=\"740\" src=\"\/wp-content\/uploads\/2020\/08\/image-38.png\" alt=\"\" class=\"wp-image-1257\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2020\/08\/image-38.png 867w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2020\/08\/image-38-300x256.png 300w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2020\/08\/image-38-768x656.png 768w\" sizes=\"auto, (max-width: 867px) 100vw, 867px\" \/><figcaption>Installing chocolatey<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once chocolatey is installed, it&#8217;s recommended to close the current window and open a new Admin PowerShell window, or use the <code>refreshenv<\/code> command. In this new window, we can now install docker-desktop and go<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>choco install docker-desktop -y\nchoco install golang -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You now need to reboot your system. Either do this through the start menu, or using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shutdown -r <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Installing and using kind on Windows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once your system has been rebooted, you can go ahead and install kind. Again, I&#8217;ll use chocolatey to install kind.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>choco install kind -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will install kind on your system. With that, either open a new window or run <code>refreshenv<\/code>. With that done, you can create a kind cluster using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kind create cluster<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Which will create the cluster for you:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"385\" height=\"325\" src=\"\/wp-content\/uploads\/2020\/08\/image-39.png\" alt=\"\" class=\"wp-image-1258\" srcset=\"https:\/\/nillsfblog.blob.core.windows.net\/media\/2020\/08\/image-39.png 385w, https:\/\/nillsfblog.blob.core.windows.net\/media\/2020\/08\/image-39-300x253.png 300w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/><figcaption>Creating a kind cluster and getting the nodes.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And as you can see, we now have a single-node kind cluster. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With that out of the way, you can now also onboard this kind cluster to Azure Arc, which I explained <a href=\"https:\/\/blog.nillsf.com\/index.php\/2020\/08\/14\/onboarding-a-kubernetes-cluster-to-azure-arc\/\">here<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, we explored how you can setup kind on Windows. Using chocolatey made the end-to-end installation pretty easy, the only downside being the need to the reboot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I wrote a blog about how to run kind to run local Kubernetes cluster In that post I installed kind on my WSL setup. Kind &#8211; or Kubernetes in Docker &#8211; is a way to run local Kubernetes clusters easily and quickly. In this post, I&#8217;ll explore how to setup kind on a Windows [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[58,41],"tags":[86,131,18,42],"class_list":["post-1255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","category-windows","tag-docker","tag-kind","tag-kubernetes","tag-windows"],"jetpack_featured_media_url":"https:\/\/nillsfblog.blob.core.windows.net\/media\/2020\/08\/image-39.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/posts\/1255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/comments?post=1255"}],"version-history":[{"count":2,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/posts\/1255\/revisions"}],"predecessor-version":[{"id":1259,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/posts\/1255\/revisions\/1259"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/media\/1258"}],"wp:attachment":[{"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/media?parent=1255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/categories?post=1255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nillsf.com\/index.php\/wp-json\/wp\/v2\/tags?post=1255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}