<?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: Bernd Künnen</title>
    <description>The latest articles on DEV Community by Bernd Künnen (@docdiesel).</description>
    <link>https://dev.to/docdiesel</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%2F4059532%2F2b0d2994-35c9-4719-a636-7e2245f2bc07.png</url>
      <title>DEV Community: Bernd Künnen</title>
      <link>https://dev.to/docdiesel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/docdiesel"/>
    <language>en</language>
    <item>
      <title>Single-Node OpenShift on AWS via UPI: A Lean Setup for Labs &amp; Training</title>
      <dc:creator>Bernd Künnen</dc:creator>
      <pubDate>Fri, 27 Nov 2026 20:59:06 +0000</pubDate>
      <link>https://dev.to/docdiesel/single-node-openshift-on-aws-via-upi-a-lean-setup-for-labs-training-26mj</link>
      <guid>https://dev.to/docdiesel/single-node-openshift-on-aws-via-upi-a-lean-setup-for-labs-training-26mj</guid>
      <description>&lt;p&gt;Spinning up a Single-Node OpenShift (SNO) cluster on AWS for training or lab environments doesn't always require heavy Terraform or CloudFormation scaffolding. With &lt;strong&gt;User-Provisioned Infrastructure (UPI)&lt;/strong&gt;, you stay close to the actual mechanics and see every stage of the cluster coming up.&lt;/p&gt;

&lt;p&gt;Because AWS AMIs do not support "Bootstrap-in-Place" installations, you briefly start with a temporary bootstrap instance before the master node takes over.&lt;/p&gt;




&lt;h2&gt;
  
  
  What You Need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Temporary Bootstrap Node:&lt;/strong&gt; EC2 &lt;code&gt;m6i.xlarge&lt;/code&gt; (4 vCPUs, 16 GB RAM) with 100 GB &lt;code&gt;gp3&lt;/code&gt; storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Master Node (SNO):&lt;/strong&gt; EC2 &lt;code&gt;m6i.2xlarge&lt;/code&gt; (8 vCPUs, 32 GB RAM) with 120 GB &lt;code&gt;gp3&lt;/code&gt; storage and an Elastic IP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Management Station / Web Server:&lt;/strong&gt; An external host with &lt;code&gt;oc&lt;/code&gt; and &lt;code&gt;openshift-install&lt;/code&gt;, SSH access, and an Nginx web server to serve the Ignition configs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prerequisites:&lt;/strong&gt; Your own DNS domain, a cluster name (e.g., &lt;code&gt;ocp&lt;/code&gt;), a Red Hat pull secret, and an SSH public key.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Key Steps at a Glance
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Fresh Directory &amp;amp; &lt;code&gt;install-config.yaml&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Always run the installer in a clean, empty directory—leftover hidden state files from earlier attempts can cause certificate or SNI mismatches. Also back up your &lt;code&gt;install-config.yaml&lt;/code&gt;, as the installer removes it during setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;baseDomain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;x68k.de&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ocp&lt;/span&gt;
&lt;span class="na"&gt;compute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;worker&lt;/span&gt;
  &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="na"&gt;controlPlane&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;master&lt;/span&gt;
  &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
  &lt;span class="na"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="na"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;none&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="na"&gt;fips&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="na"&gt;pullSecret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'{"auths":{...}}'&lt;/span&gt;
&lt;span class="na"&gt;sshKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ssh-ed25519 AAAAC3...'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;(Add your Red Hat pull secret and SSH public key in the final two lines.)&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Schedulable Master &amp;amp; Ignition Pointers
&lt;/h3&gt;

&lt;p&gt;To allow the ingress router and image registry to run on the single node, set &lt;code&gt;mastersSchedulable&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; before generating the Ignition files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openshift-install create manifests --dir=.
sed -i &lt;span class="s1"&gt;'s/mastersSchedulable: false/mastersSchedulable: true/'&lt;/span&gt; manifests/cluster-scheduler-02-config.yml
openshift-install create ignition-configs --dir=.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because AWS EC2 User-Data is limited to &lt;strong&gt;16 KB&lt;/strong&gt; and the generated &lt;code&gt;.ign&lt;/code&gt; files are larger, host &lt;code&gt;bootstrap.ign&lt;/code&gt; and &lt;code&gt;master.ign&lt;/code&gt; on your Nginx web server and pass small JSON pointer configs into EC2 User-Data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"ignition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"3.2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"config"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"replace"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://mgmt.mydoma.in/ignition/bootstrap.ign"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Launch, DNS, and Cutover
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Resize the &lt;code&gt;gp3&lt;/code&gt; root volumes directly in the EC2 launch wizard—RHCOS expands the root partition automatically on first boot.&lt;/li&gt;
&lt;li&gt;Configure your DNS records (&lt;code&gt;api.&amp;lt;cluster&amp;gt;.&amp;lt;domain&amp;gt;&lt;/code&gt;, &lt;code&gt;api-int.&amp;lt;cluster&amp;gt;.&amp;lt;domain&amp;gt;&lt;/code&gt;, and &lt;code&gt;*.apps.&amp;lt;cluster&amp;gt;.&amp;lt;domain&amp;gt;&lt;/code&gt;) with a low TTL (&lt;code&gt;60s&lt;/code&gt;) so updates propagate quickly.&lt;/li&gt;
&lt;li&gt;Once the master takes over the control plane, point the API DNS records to the master and terminate the bootstrap node after &lt;code&gt;openshift-install wait-for bootstrap-complete&lt;/code&gt; succeeds.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Common Pitfalls &amp;amp; Recovery Anchors
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pending CSRs:&lt;/strong&gt; Unapproved Certificate Signing Requests can leave network and workload pods stuck in &lt;code&gt;ContainerCreating&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Kubeconfig on the Master:&lt;/strong&gt; If the external API isn't reachable yet over SSH, inspect the cluster via &lt;code&gt;/etc/kubernetes/static-pod-resources/kube-apiserver-certs/secrets/node-kubeconfigs/localhost.kubeconfig&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;etcd Quorum:&lt;/strong&gt; If &lt;code&gt;etcd&lt;/code&gt; loses quorum during handoff, run &lt;code&gt;sudo -E /usr/local/bin/quorum-restore.sh&lt;/code&gt; (stopping running &lt;code&gt;etcd&lt;/code&gt; containers first if needed).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Cleanup &amp;amp; Storage
&lt;/h3&gt;

&lt;p&gt;Once the cluster is up, tighten your security group rules, remove the Ignition files from the web server (as they contain sensitive data), and raise the DNS TTL back up. For dynamic PVC provisioning, install &lt;strong&gt;Red Hat LVM Storage (LVMS)&lt;/strong&gt; via a &lt;code&gt;Subscription&lt;/code&gt; in the &lt;code&gt;openshift-storage&lt;/code&gt; namespace.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wrap-Up
&lt;/h2&gt;

&lt;p&gt;For workshops and lab environments, the UPI route on AWS is great when you want visibility into bootstrap, cutover, and storage without hiding behind black-box automation.&lt;/p&gt;

&lt;p&gt;For the full step-by-step walkthrough, check out the detailed guide in the repository: &lt;a href="https://github.com/katalyticIT/ocp-sno/blob/main/openshift_single_node_aws_upi_installation_guide.md" rel="noopener noreferrer"&gt;openshift_single_node_aws_upi_installation_guide.md&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>openshift</category>
      <category>kubernetes</category>
      <category>aws</category>
      <category>devops</category>
    </item>
    <item>
      <title>How I added initContainers and env vars to every deployment without Kyverno</title>
      <dc:creator>Bernd Künnen</dc:creator>
      <pubDate>Tue, 04 Aug 2026 16:09:54 +0000</pubDate>
      <link>https://dev.to/docdiesel/how-i-added-initcontainers-and-env-vars-to-every-deployment-without-kyverno-24kc</link>
      <guid>https://dev.to/docdiesel/how-i-added-initcontainers-and-env-vars-to-every-deployment-without-kyverno-24kc</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;We needed to modify deployments in the background and decided against Kyverno (too big). Instead a leightweight mutating Webhook called "kTailor" was built and &lt;a href="https://github.com/katalyticIT/kTailor" rel="noopener noreferrer"&gt;published&lt;/a&gt; under Apache 2.0. Its main purpose is to insert env vars, initContainers and sidecars.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Starting Point
&lt;/h2&gt;

&lt;p&gt;Moving containers through time in a customer project, we're adding &lt;a href="https://github.com/wolfcw/libfaketime" rel="noopener noreferrer"&gt;libfaketime&lt;/a&gt; to each deployment via an initContainer - banks sometimes need to do that to check if the software works fine on new years day. This method can be turned on and off easily by a switch in a central helm chart which is used for all internal apps. So far, so good.&lt;/p&gt;

&lt;p&gt;Then came the first external app, and we didn't want to mess with its helm chart every time we wanted it to travel through time. So what to do if you've need to go back to 1985 but don't have 1.21 GW?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Motivation
&lt;/h2&gt;

&lt;p&gt;Well, there's Kyverno. Besides enforcing rules and policies it's capable of modifying deployments in the background without having to touch the helm chart - exactly what we needed. But I found that Kyverno is also a heavy weight and a &lt;em&gt;bit&lt;/em&gt; oversized for our needs. Besides, there's all that paperwork to get allowance to run another external app deep inside your clusters ...&lt;/p&gt;

&lt;p&gt;So I decided to write a small Kubernetes Mutating Webhook that fits to our needs and is flexible enough to be useful for other purposes as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  What kTailor does
&lt;/h2&gt;

&lt;p&gt;kTailor is written in Go and thus practically Kubernetes native. Its goals on mutating a deployment (and &lt;em&gt;no other&lt;/em&gt; k8s ressources) are the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modify the main container and

&lt;ul&gt;
&lt;li&gt;add, modify or remove env vars&lt;/li&gt;
&lt;li&gt;add or remove volumeMounts&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Add initContainers&lt;/li&gt;
&lt;li&gt;Add sidecar containers&lt;/li&gt;
&lt;li&gt;Add volumes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's more than enough in many cases. It enables us to inject the libfaketime library in the background and thus move the containers "through time". The technique is the same as used by many products like Dynatrace, Istio and others, every case when one needs to add a sidecar or initcontainer in the background.&lt;/p&gt;

&lt;p&gt;With kTailor, now you can do it on your own. The software is Open Source and free to use. It's syntax is that of a simple k8s deployment and thus easy to handle - no need to learn to write Kyverno policies.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;All rules for modification are stored in a simple configMap of which you can have as many as you need. You can store these templates aside your app in its namespace ("local") or in kTailors namespace ("central"). &lt;em&gt;Important:&lt;/em&gt; The configMap needs a special label to motivate kTailor to load it into its cache:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;ktailor.dev/template: "true"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The trigger point is a label, too. Add a label like the following to a deployment and kTailor will add/modify the objects that are mentioned in your template:&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;ktailor.dev/fit: "central.my-template"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Online ressources
&lt;/h2&gt;

&lt;p&gt;You'll find the repo at &lt;a href="https://github.com/katalyticIT/kTailor" rel="noopener noreferrer"&gt;github&lt;/a&gt; and the documentation at &lt;a href="https://ktailor.dev" rel="noopener noreferrer"&gt;ktailor.dev&lt;/a&gt;. And there's an &lt;em&gt;online demo&lt;/em&gt; at  &lt;a href="https://killercoda.com/ktailor-demo" rel="noopener noreferrer"&gt;killercoda.com&lt;/a&gt; that you can try for free: The scenario spawns a small one-node kubernetes cluster and installs the webhook along with two small demo applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Have fun
&lt;/h2&gt;

&lt;p&gt;Maybe it's useful for some other k8s users, e.g. to&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;insert a http proxy sidecar to see where your app sends requests to (without you knowing?), or&lt;/li&gt;
&lt;li&gt;insert a proxysql sidecar to track and measure the apps database calls, maybe to find and optimate the slower ones.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have fun with kTailor and I'm looking forward to your feedback.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>containers</category>
      <category>webhook</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
