<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Henry Hans</title>
    <description>The latest articles on DEV Community by Henry Hans (@henry_hans_author).</description>
    <link>https://dev.to/henry_hans_author</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4254407%2F772d7cd1-fe3d-4acd-b64f-42901b187c56.png</url>
      <title>DEV Community: Henry Hans</title>
      <link>https://dev.to/henry_hans_author</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/henry_hans_author"/>
    <language>en</language>
    <item>
      <title>7 gotchas I hit building a 3-node Kubernetes cluster on Ubuntu 26.04</title>
      <dc:creator>Henry Hans</dc:creator>
      <pubDate>Thu, 26 Nov 2026 14:14:10 +0000</pubDate>
      <link>https://dev.to/henry_hans_author/7-gotchas-i-hit-building-a-3-node-kubernetes-cluster-on-ubuntu-2604-250d</link>
      <guid>https://dev.to/henry_hans_author/7-gotchas-i-hit-building-a-3-node-kubernetes-cluster-on-ubuntu-2604-250d</guid>
      <description>&lt;p&gt;I recently built a three-node Kubernetes cluster with kubeadm on fresh Ubuntu Server 26.04 LTS virtual machines: one control plane node and two workers. The official docs got me most of the way. These seven problems got me the rest of the way, and none of them announced themselves clearly.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. VM clock drift breaks &lt;code&gt;kubeadm init&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If a VM's clock is off, kubeadm generates certificates that are "not yet valid" from the point of view of another node, and you get TLS errors that look like a networking problem. VMs that were suspended or cloned are the usual suspects.&lt;/p&gt;

&lt;p&gt;Check every node before you start:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;timedatectl status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want &lt;code&gt;System clock synchronized: yes&lt;/code&gt;. If it says no, fix time sync first and only then run &lt;code&gt;kubeadm init&lt;/code&gt; or &lt;code&gt;kubeadm join&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Cloned VMs with the same hostname
&lt;/h2&gt;

&lt;p&gt;I cloned the first worker to make the second. Both had the same hostname, so &lt;code&gt;kubeadm join&lt;/code&gt; on the clone didn't add a new node. It quietly replaced the existing one. No error, just one worker where there should be two.&lt;/p&gt;

&lt;p&gt;Give each clone its own identity before joining:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo hostnamectl set-hostname k8s-worker2
sudo rm -f /etc/machine-id
sudo systemd-machine-id-setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;kubeadm also expects a unique MAC address and product_uuid on every node:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ip link
sudo cat /sys/class/dmi/id/product_uuid
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. "Multiple CRI endpoints" on join
&lt;/h2&gt;

&lt;p&gt;I used Docker Engine with cri-dockerd. Docker also brings its own containerd, so kubeadm finds two container runtime sockets and refuses to guess. Tell it which one to use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo kubeadm join 10.0.0.10:6443 --token &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;token&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; \
  --discovery-token-ca-cert-hash sha256:&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; \
  --cri-socket unix:///var/run/cri-dockerd.sock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same flag applies to &lt;code&gt;kubeadm init&lt;/code&gt; and &lt;code&gt;kubeadm reset&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. No dedicated cri-dockerd .deb package for Ubuntu 26.04 LTS
&lt;/h2&gt;

&lt;p&gt;As of November 2026, cri-dockerd's official release page provides distribution-specific .deb packages for Ubuntu 20.04, 22.04, and 24.04 LTS, but not for Ubuntu 26.04 LTS (Resolute Raccoon).&lt;br&gt;
When a package for your Ubuntu release is unavailable, download the generic Linux .tgz binary for your CPU architecture and manually install the corresponding systemd service and socket unit files from the same release tag of the project's repository.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Pinning an unsupported Kubernetes version
&lt;/h2&gt;

&lt;p&gt;My first draft pinned a Kubernetes version that had already reached its end of life (EOL). The Kubernetes project maintains release branches for the three most recent minor versions, with each release receiving approximately one year of patch support.&lt;/p&gt;

&lt;p&gt;Choose a currently supported minor version and configure APT to use the corresponding version-specific repository hosted at pkgs.k8s.io.&lt;/p&gt;

&lt;p&gt;Although this example uses Kubernetes v1.35, always check the official Kubernetes release lifecycle before deploying a new cluster, and install the latest available patch release within your selected minor version.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. A pinned Kubernetes version that is already unsupported
&lt;/h2&gt;

&lt;p&gt;My first draft pinned a Kubernetes version that had fallen outside the supported window. The Kubernetes project maintains release branches for the three most recent minor versions only. Pick a current minor (I used v1.35) and point apt at that minor's repository on pkgs.k8s.io.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. apt fails silently because unattended-upgrades holds the lock
&lt;/h2&gt;

&lt;p&gt;A fresh Ubuntu VM often runs unattended-upgrades in the first minutes after boot. If your provisioning script runs &lt;code&gt;apt-get install&lt;/code&gt; at the same time, it can fail on the dpkg lock, and in a script that failure is easy to miss.&lt;/p&gt;

&lt;p&gt;Wait for the lock before installing anything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; sudo fuser /var/lib/dpkg/lock-frontend &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  sleep 5
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. &lt;code&gt;sudo -i&lt;/code&gt; puts kubeconfig in the wrong home directory
&lt;/h2&gt;

&lt;p&gt;After &lt;code&gt;kubeadm init&lt;/code&gt;, the docs tell you to copy admin.conf to &lt;code&gt;$HOME/.kube/config&lt;/code&gt;. If you are in a root shell from &lt;code&gt;sudo -i&lt;/code&gt; or &lt;code&gt;sudo su&lt;/code&gt;, &lt;code&gt;$HOME&lt;/code&gt; is &lt;code&gt;/root&lt;/code&gt;, so the config lands there and &lt;code&gt;kubectl&lt;/code&gt; fails for your normal user. Run these as your regular user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir -p &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.kube
sudo cp -i /etc/kubernetes/admin.conf &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.kube/config
sudo chown &lt;span class="nv"&gt;$(&lt;/span&gt;id -u&lt;span class="o"&gt;)&lt;/span&gt;:&lt;span class="nv"&gt;$(&lt;/span&gt;id -g&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.kube/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The common thread
&lt;/h2&gt;

&lt;p&gt;Almost every one of these came from cloned VMs or a fresh install doing something in the background. The fix was always the same habit: build the cluster from scratch, then build it again, and write down what broke.&lt;/p&gt;




&lt;p&gt;These notes come from testing the Kubernetes chapter of my book, &lt;em&gt;Hands-On Ubuntu Server 26.04 LTS&lt;/em&gt;, where every procedure was run on real VMs before it went into print. If you hit something I didn't list here, I'd like to hear about it in the comments.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>infrastructure</category>
      <category>kubernetes</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
