<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ihor dvoretskyi on Medium]]></title>
        <description><![CDATA[Stories by ihor dvoretskyi on Medium]]></description>
        <link>https://medium.com/@ihor_dvoretskyi?source=rss-44fff944f86e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zzFS9nnNgyyugreZpxSkpA@2x.jpeg</url>
            <title>Stories by ihor dvoretskyi on Medium</title>
            <link>https://medium.com/@ihor_dvoretskyi?source=rss-44fff944f86e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 21:30:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ihor_dvoretskyi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Running Kubernetes locally on Linux with Microk8s]]></title>
            <link>https://medium.com/@ihor_dvoretskyi/running-kubernetes-locally-on-linux-with-microk8s-a55cc9703391?source=rss-44fff944f86e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a55cc9703391</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[microk8s]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[ihor dvoretskyi]]></dc:creator>
            <pubDate>Mon, 09 Dec 2019 00:00:00 GMT</pubDate>
            <atom:updated>2019-12-18T14:51:01.466Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Authors</strong>: <a href="https://twitter.com/idvoretskyi">Ihor Dvoretskyi</a>, Developer Advocate, Cloud Native Computing Foundation; <a href="https://twitter.com/carminerimi">Carmine Rimi</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*34MHIytY0vhDlq9kVUEZwA.png" /><figcaption>Source: <a href="https://landscape.cncf.io/selected=micro-k8s">https://landscape.cncf.io/selected=micro-k8s</a></figcaption></figure><p>This article, the second in a <a href="https://kubernetes.io/blog/2019/03/28/running-kubernetes-locally-on-linux-with-minikube-now-with-kubernetes-1.14-support/">series</a> about local deployment options on Linux, and covers <a href="https://microk8s.io/">MicroK8s</a>. Microk8s is the click-and-run solution for deploying a Kubernetes cluster locally, originally developed by Canonical, the publisher of Ubuntu.</p><p>While Minikube usually spins up a local virtual machine (VM) for the Kubernetes cluster, MicroK8s doesn’t require a VM. It uses <a href="https://snapcraft.io/">snap</a> packages, application packaging, and isolation technology.</p><p>This difference has its pros and cons. Here we’ll discuss a few of the interesting differences, and comparing the benefits of a VM based approach with the benefits of a non-VM approach. One of the first factors is cross-platform portability. While a Minikube VM is portable across operating systems — it supports not only Linux, but Windows, macOS, and even FreeBSD — Microk8s requires Linux, and only on those distributions <a href="https://snapcraft.io/docs/installing-snapd">that support snaps</a>. Most popular Linux distributions are supported.</p><p>Another factor to consider is resource consumption. While a VM appliance gives you greater portability, it does mean you’ll consume more resources to run the VM, primarily because the VM ships a complete operating system, and runs on top of a hypervisor. You’ll consume more disk space when the VM is dormant. You’ll consume more RAM and CPU while it is running. Since Microk8s doesn’t require spinning up a virtual machine you’ll have more resources to run your workloads and other applications. Given its smaller footprint, MicroK8s is ideal for IoT devices — you can even use it on a Raspberry Pi device!</p><p>Finally, the projects appear to follow a different release cadence and strategy. MicroK8s, and snaps, in general, provide <a href="https://snapcraft.io/docs/channels">channels</a> that allow you to consume beta and release candidate versions of new releases of Kubernetes, as well as the previous stable release. Microk8s generally releases the stable release of upstream Kubernetes almost immediately.</p><p>But wait, there’s more! Minikube and MicroK8s both started as single-node clusters. Essentially, they allow you to create a Kubernetes cluster with a single worker node. That is about to change — there’s an early alpha release of MicroK8s that includes clustering. With this capability, you can create Kubernetes clusters with as many worker nodes as you wish. This is effectively an un-opinionated option for creating a cluster — the developer must create the network connectivity between the nodes, as well as integrate with other infrastructure that may be required, like an external load-balancer. In summary, MicroK8s offers a quick and easy way to turn a handful of computers or VMs into a multi-node Kubernetes cluster. We’ll write more about this kind of architecture in a future article.</p><h3>Disclaimer</h3><p><em>This is not an official guide to MicroK8s. You may find detailed information on running and using MicroK8s on its official </em><a href="https://microk8s.io/docs/"><em>webpage</em></a><em>, where different use cases, operating systems, environments, etc. are covered. Instead, the purpose of this post is to provide clear and easy guidelines for running MicroK8s on Linux.</em></p><h3>Prerequisites</h3><p>A Linux distribution that <a href="https://snapcraft.io/docs/installing-snapd">supports snaps</a>, is required. In this guide, we’ll use Ubuntu 18.04 LTS, it supports snaps out-of-the-box. If you are interested in running Microk8s on Windows or Mac, you should check out <a href="https://multipass.run/">Multipass</a> to stand up a quick Ubuntu VM as the official way to run virtual Ubuntu on your system.</p><h3>MicroK8s installation</h3><p>MicroK8s installation is straightforward:</p><pre>sudo snap install microk8s --classic</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aed8owlr7wDX13ur.png" /></figure><p>The command above installs a local single-node Kubernetes cluster in seconds. Once the command execution is finished, your Kubernetes cluster is up and running.</p><p>You may verify the MicroK8s status with the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cXvLJ0xwcRKx41XF.png" /></figure><h3>Using microk8s</h3><p>Using MicroK8s is as straightforward as installing it. MicroK8s itself includes a kubectl binary, which can be accessed by running the microk8s.kubectl command. As an example:</p><pre>microk8s.kubectl get nodes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cTpGjR95xi9sT1To.png" /></figure><p>While using the prefix microk8s.kubectl allows for a parallel install of another system-wide kubectl without impact, you can easily get rid of it by using the snap alias command:</p><pre>sudo snap alias microk8s.kubectl kubectl</pre><p>This will allow you to simply use kubectl after. You can revert this change using the snap unalias command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s7sNwvnlv0_9-dmm.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2OeECmQ-1cIha8z-.png" /></figure><h3>MicroK8s addons</h3><p>One of the biggest benefits of using Microk8s is the fact that it also supports various add-ons and extensions. What is even more important is they are shipped out of the box, the user just has to enable them.</p><p>The full list of extensions can be checked by running the microk8s.status command:</p><pre>sudo microk8s.status</pre><p>As of the time of writing this article, the following add-ons are supported:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IVkjDwzgcBRKPXyM.png" /></figure><p>More add-ons are being created and contributed by the community all the time, it definitely helps to check often!</p><h3>Release channels</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MqsX7__pJr1OtK_P.png" /></figure><h3>Installing the sample application</h3><p>In this tutorial, we’ll use NGINX as a sample application ( <a href="https://hub.docker.com/_/nginx">the official Docker Hub image</a>).</p><p>It will be installed as a Kubernetes deployment:</p><pre>kubectl create deployment nginx --image=nginx</pre><p>To verify the installation, let’s run the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aNEEp8EA6Z_84nqa.png" /></figure><p>Also, we can retrieve the full output of all available objects within our Kubernetes cluster:</p><pre>kubectl get all --all-namespaces</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FUqcC3j1ETDyDIMa.png" /></figure><h3>Uninstalling MicroK8s</h3><p>Uninstalling your microk8s cluster is so easy as uninstalling the snap:</p><pre>sudo snap remove microk8s</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Sd3Wa5u2HG-RFISb.png" /></figure><h3>Screencast</h3><p><a href="https://asciinema.org/a/263394">microk8s</a></p><p><em>Originally published at </em><a href="https://kubernetes.io/blog/2019/11/26/running-kubernetes-locally-on-linux-with-microk8s/"><em>https://kubernetes.io</em></a><em> on Tuesday, November 26, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a55cc9703391" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Kubernetes locally on Linux with Minikube]]></title>
            <link>https://medium.com/@ihor_dvoretskyi/running-kubernetes-locally-on-linux-with-minikube-8c05c795233e?source=rss-44fff944f86e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c05c795233e</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[minikube]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[ihor dvoretskyi]]></dc:creator>
            <pubDate>Mon, 09 Dec 2019 00:00:00 GMT</pubDate>
            <atom:updated>2019-12-16T14:31:01.279Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author</strong>: <a href="https://twitter.com/idvoretskyi">Ihor Dvoretskyi</a>, Developer Advocate, Cloud Native Computing Foundation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cwZgUhsNHbRkF9ok.jpg" /><figcaption><a href="https://unsplash.com/photos/UGKfiS5CcZI">https://unsplash.com/photos/UGKfiS5CcZI</a></figcaption></figure><p>Kubernetes is a real winner (and a de facto standard) in the world of distributed Cloud Native computing. While it can handle up to <a href="https://kubernetes.io/blog/2017/03/scalability-updates-in-kubernetes-1.6">5000 nodes</a> in a single cluster, local deployment on a single machine (e.g. a laptop, a developer workstation, etc.) is an increasingly common scenario for using Kubernetes.</p><p>Recently, I ran a poll on Twitter asking the community to specify their preferred option for running Kubernetes locally on Linux:</p><h3>ihor dvoretskyi @ 🇺🇦 on Twitter</h3><p>Ok, Twitter ✋ Your local Kubernetes cluster on Linux is deployed by:</p><p>This is post #1 in a series about the local deployment options on Linux, and it will cover Minikube, the most popular community-built solution for running Kubernetes on a local machine.</p><p><a href="https://github.com/kubernetes/minikube">Minikube</a> is a cross-platform, community-driven <a href="https://kubernetes.io/">Kubernetes</a> distribution, which is targeted to be used primarily in local environments. It deploys a single-node cluster, which is an excellent option for having a simple Kubernetes cluster up and running on the localhost.</p><p>Minikube is designed to be used as a virtual machine (VM), and the default VM runtime is <a href="https://www.virtualbox.org/">VirtualBox</a>. At the same time, extensibility is one of the critical benefits of Minikube, so it’s possible to use it with <a href="https://github.com/kubernetes/minikube/blob/master/docs/drivers.md">drivers</a> outside of VirtualBox.</p><p>By default, Minikube uses Virtualbox as a runtime for running the virtual machine. Virtualbox is a cross-platform solution, which can be used on a variety of operating systems, including GNU/Linux, Windows, and macOS.</p><p>At the same time, QEMU/KVM is a Linux-native virtualization solution, which may offer benefits compared to Virtualbox. For example, it’s much easier to use KVM on a GNU/Linux server, so you can run a single-node Minikube cluster not only on a Linux workstation or laptop with GUI, but also on a remote headless server.</p><p>Unfortunately, Virtualbox and KVM can’t be used simultaneously, so if you are already running KVM workloads on a machine and want to run Minikube there as well, using the KVM minikube driver is the preferred way to go.</p><p>In this guide, we’ll focus on running Minikube with the KVM driver on Ubuntu 18.04 (I am using a bare metal machine running on <a href="https://www.packet.com/">packet.com</a>.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wknJBro1dWdWifsr.png" /></figure><p>Minikube architecture (source: kubernetes.io)</p><h4>Disclaimer</h4><p><em>This is not an official guide to Minikube. You may find detailed information on running and using Minikube on its official </em><a href="https://github.com/kubernetes/minikube"><em>webpage</em></a><em>, where different use cases, operating systems, environments, etc. are covered. Instead, the purpose of this guide is to provide clear and easy guidelines for running Minikube with KVM on Linux.</em></p><h3>Prerequisites</h3><ul><li>Any Linux you like (in this tutorial we’ll use Ubuntu 18.04 LTS, and all the instructions below are applicable to it. If you prefer using a different Linux distribution, please check out the relevant documentation)</li><li>libvirt and QEMU-KVM installed and properly configured</li><li>The Kubernetes CLI (kubectl) for operating the Kubernetes cluster</li></ul><h3>QEMU/KVM and libvirt installation</h3><p><em>NOTE: skip if already installed</em></p><p>Before we proceed, we have to verify if our host can run KVM-based virtual machines. This can be easily checked using the <a href="https://manpages.ubuntu.com/manpages/bionic/man1/kvm-ok.1.html">kvm-ok</a> tool, available on Ubuntu.</p><pre>sudo apt install cpu-checker &amp;&amp; sudo kvm-ok</pre><p>If you receive the following output after running kvm-ok, you can use KVM on your machine (otherwise, please check out your configuration):</p><pre>$ sudo kvm-ok INFO: /dev/kvm exists KVM acceleration can be used</pre><p>Now let’s install KVM and libvirt and add our current user to the libvirt group to grant sufficient permissions:</p><pre>sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm \ &amp;&amp; sudo usermod -a -G libvirt $(whoami) \ &amp;&amp; newgrp libvirt</pre><p>After installing libvirt, you may verify the host validity to run the virtual machines with thevirt-host-validate tool, which is a part of libvirt.</p><h3>kubectl (Kubernetes CLI) installation</h3><p><em>NOTE: skip if already installed</em></p><p>In order to manage the Kubernetes cluster, we need to install <a href="https://kubernetes.io/docs/reference/kubectl/overview/">kubectl</a>, the Kubernetes CLI tool.</p><p>The recommended way to install it on Linux is to download the pre-built binary and move it to a directory under the $PATH.</p><pre>curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \ &amp;&amp; sudo install kubectl /usr/local/bin &amp;&amp; rm kubectl</pre><p>Alternatively, kubectl can be installed with a big variety of different methods (eg. as a .deb or snap package — check out the <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">kubectl documentation</a> to find the best one for you).</p><h3>Minikube installation</h3><h4>Minikube KVM driver installation</h4><p>A VM driver is an essential requirement for local deployment of Minikube. As we’ve chosen to use KVM as the Minikube driver in this tutorial, let’s install the KVM driver with the following command:</p><pre>curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \ &amp;&amp; sudo install docker-machine-driver-kvm2 /usr/local/bin/ &amp;&amp; rm docker-machine-driver-kvm2</pre><h4>Installing Minikube</h4><p>Now let’s install Minikube itself:</p><pre>curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ &amp;&amp; sudo install minikube-linux-amd64 /usr/local/bin/minikube &amp;&amp; rm minikube-linux-amd64</pre><h4>Verify the Minikube installation</h4><p>Before we proceed, we need to verify that Minikube is correctly installed. The simplest way to do this is to check Minikube’s status.</p><h4>To use the KVM2 driver:</h4><p>Now let’s run the local Kubernetes cluster with Minikube and KVM:</p><pre>minikube start --vm-driver kvm2</pre><h4>Set KVM2 as a default VM driver for Minikube</h4><p>If KVM is used as the single driver for Minikube on our machine, it’s more convenient to set it as a default driver and run Minikube with fewer command-line arguments. The following command sets the KVM driver as the default:</p><pre>minikube config set vm-driver kvm2</pre><p>So now let’s run Minikube as usual:</p><h4>Verify the Kubernetes installation</h4><p>Let’s check if the Kubernetes cluster is up and running:</p><p>Now let’s run a simple sample app (nginx in our case):</p><pre>kubectl create deployment nginx --image=nginx</pre><p>Let’s also check that the Kubernetes pods are correctly provisioned:</p><pre>kubectl get pods</pre><h4>Screencast</h4><p><a href="https://asciinema.org/a/237106">minikube_v1.0</a></p><h3>Next steps</h3><p>At this point, a Kubernetes cluster with Minikube and KVM is adequately set up and configured on your local machine.</p><p>To proceed, you may check out the Kubernetes tutorials on the project website:</p><p>It’s also worth checking out the “Introduction to Kubernetes” course by The Linux Foundation/Cloud Native Computing Foundation, available for free on EDX:</p><p><em>Originally published at </em><a href="https://kubernetes.io/blog/2019/03/28/running-kubernetes-locally-on-linux-with-minikube-now-with-kubernetes-1.14-support/"><em>https://kubernetes.io</em></a><em> on Thursday, March 28, 2019</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c05c795233e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>