<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Kubernetes on iMil.net</title>
    <link>http://imil.net/blog/tags/kubernetes/</link>
    <description>Recent content in Kubernetes on iMil.net</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 23 Oct 2023 11:46:31 +0200</lastBuildDate>
    <atom:link href="http://imil.net/blog/tags/kubernetes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>NetBSD as a Kubernetes Pod</title>
      <link>http://imil.net/blog/posts/2023/netbsd-as-a-k8s-pod/</link>
      <pubDate>Mon, 23 Oct 2023 11:46:31 +0200</pubDate>
      <guid>http://imil.net/blog/posts/2023/netbsd-as-a-k8s-pod/</guid>
      <description>&lt;p&gt;&lt;strong&gt;2025/01 Update&lt;/strong&gt; &lt;a href=&#34;https://github.com/NetBSDfr/smolBSD/tree/main/k8s&#34;&gt;https://github.com/NetBSDfr/smolBSD/tree/main/k8s&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I had to do it.&lt;br&gt;&#xA;So here&amp;rsquo;s how to run a &lt;em&gt;NetBSD&lt;/em&gt; micro-vm as&amp;hellip; a &lt;em&gt;Kubernetes&lt;/em&gt; pod.&lt;/p&gt;&#xA;&lt;p&gt;First thing is to modify the &lt;a href=&#34;https://imil.net/blog/posts/2023/netbsd-as-a-docker-container/&#34;&gt;start script from the previous article&lt;/a&gt; in order to add &lt;em&gt;Docker&lt;/em&gt;-style networking, i.e. port forwarding from the host to the micro-vm. This is done using the &lt;code&gt;hostfwd&lt;/code&gt; flag in &lt;em&gt;qemu&lt;/em&gt;&amp;rsquo;s &lt;code&gt;-netdev&lt;/code&gt; parameter&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kernel&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;$1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;img&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;2&lt;span style=&#34;color:#66d9ef&#34;&gt;:-&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;root.img&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt; -n &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$3&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; drive2&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;-drive file=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;3&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;,if=virtio&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;qemu-system-x86_64 -enable-kvm -m &lt;span style=&#34;color:#ae81ff&#34;&gt;256&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;&lt;/span&gt;        -kernel $kernel -append &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;console=com root=ld0a&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;&lt;/span&gt;        -serial mon:stdio -display none &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;&lt;/span&gt;        -drive file&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;img&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;,if&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;virtio $drive2 &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;&lt;/span&gt;        -netdev user,id&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;net0,hostfwd&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;tcp::8080-:80 -device virtio-net,netdev&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;net0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://imil.net/blog/posts/2023/netbsd-as-a-docker-container/&#34;&gt;In the previous experience&lt;/a&gt; we mapped the kernel and the root image from the host using &lt;em&gt;Docker&lt;/em&gt;&amp;rsquo;s &lt;code&gt;-v&lt;/code&gt; parameter, and while it&amp;rsquo;s possible to map files from the host using a &lt;em&gt;Kubernetes&lt;/em&gt; &lt;code&gt;volume&lt;/code&gt;, we will bundle &lt;em&gt;NetBSD&lt;/em&gt; these files into the &lt;em&gt;Docker&lt;/em&gt;  image to make things easier.&lt;br&gt;&#xA;Please refer to &lt;a href=&#34;https://gitlab.com/iMil/mksmolnb#example-of-an-image-used-to-create-an-nginx-microvm-with-sailor&#34;&gt;mksmolnb&lt;/a&gt; documentation to learn how to produce a minimal &lt;code&gt;nginx&lt;/code&gt; micro-vm.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cleaner micro Kubernetes on OSX</title>
      <link>http://imil.net/blog/posts/2019/cleaner-micro-kubernetes-on-osx/</link>
      <pubDate>Mon, 04 Feb 2019 15:41:17 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2019/cleaner-micro-kubernetes-on-osx/</guid>
      <description>&lt;p&gt;While my main workstation is a &lt;em&gt;Linux Mint&lt;/em&gt; machine, I occasionally use my &lt;em&gt;OSX&lt;/em&gt; &lt;code&gt;${WORK}&lt;/code&gt; laptop for traveling and composing. I&amp;rsquo;m not really fond of the OS, but at least it&amp;rsquo;s an &lt;em&gt;UNIX-like&lt;/em&gt;, and &lt;code&gt;pkgin&lt;/code&gt; runs well with it ;)&lt;br&gt;&#xA;When I&amp;rsquo;m &amp;ldquo;on the go&amp;rdquo;, I like to try things and play along with technologies I&amp;rsquo;m currently obsessed with, among them &lt;em&gt;Kubernetes&lt;/em&gt;.&lt;br&gt;&#xA;On &lt;em&gt;OSX&lt;/em&gt;, the natural choice is to go with &lt;a href=&#34;https://kubernetes.io/docs/setup/minikube/&#34;&gt;minikube&lt;/a&gt;, it&amp;rsquo;s kind of integrated and does the job well, but if you tried it already and also happen to run &lt;code&gt;docker&lt;/code&gt; for &lt;code&gt;OSX&lt;/code&gt; you might have found yourself struggling with versions and consistency between the two. Added to this that I wanted to have a fully functional &lt;em&gt;Linux&lt;/em&gt; virtual machine, preferably &lt;em&gt;Debian GNU/Linux&lt;/em&gt;, there was way too much inconsistencies and wasted disk and CPU space to come. So I dug by myself and found a clean and &lt;strong&gt;fast&lt;/strong&gt; solution by spawning my own virtual machine using &lt;em&gt;OSX&lt;/em&gt; native hypervisor, which runs &lt;em&gt;Canonical&amp;rsquo;s&lt;/em&gt; &lt;a href=&#34;https://microk8s.io/&#34;&gt;microk8s&lt;/a&gt;, a nicely done &lt;code&gt;snap&lt;/code&gt; package to install a fully working and modular &lt;code&gt;Kubernetes&lt;/code&gt; cluster on a &lt;em&gt;Linux&lt;/em&gt; machine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kubernetes under my desk</title>
      <link>http://imil.net/blog/posts/2018/kubernetes-under-my-desk/</link>
      <pubDate>Tue, 16 Oct 2018 14:52:05 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2018/kubernetes-under-my-desk/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m diving into &lt;a href=&#34;https://kubernetes.io&#34;&gt;Kubernetes&lt;/a&gt; for a couple of months now. Discovering the possibilities and philosophy behind the hype definitely changed my mind. Yes, it is huge (in every sense ;) ) and it does change the way we, ex-sysops / ops / syasdmins do our work. Not tomorrow, not soon, now.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve had my hands on various managed &lt;a href=&#34;https://kubernetes.io/docs/setup/scratch/&#34;&gt;kubernetes clusters&lt;/a&gt; like &lt;em&gt;GKE (Google Container Engine)&lt;/em&gt;, &lt;em&gt;EKS (AWS Elastic Container Service)&lt;/em&gt; or the more humble &lt;a href=&#34;https://kubernetes.io/docs/setup/minikube/&#34;&gt;minikube&lt;/a&gt; but I&amp;rsquo;m not happy when I don&amp;rsquo;t understand what a technology is made of. So I &lt;em&gt;googled&lt;/em&gt; and &lt;em&gt;googled&lt;/em&gt; (yeah sorry &lt;em&gt;Qwant&lt;/em&gt; and &lt;em&gt;duckduckgo&lt;/em&gt; I needed actual answers), until I found &amp;gt;&lt;a href=&#34;https://github.com/salmanb/Kubernetes-HA-on-baremetal&#34;&gt;many&lt;/a&gt; &amp;gt;&lt;a href=&#34;https://github.com/kelseyhightower/kubernetes-the-hard-way&#34;&gt;incredibly&lt;/a&gt; &amp;gt;&lt;a href=&#34;http://nerdcoding.org/blog/2018/2018-05-08-Kubernetes-with-KVM-debian-host.html&#34;&gt;useful&lt;/a&gt; resources.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
