<?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 Muhammad Adel on Medium]]></title>
        <description><![CDATA[Stories by Muhammad Adel on Medium]]></description>
        <link>https://medium.com/@muhammadadel612?source=rss-9f530a2d2302------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ydIAmBIHlAcXY1FmxI_pPw.jpeg</url>
            <title>Stories by Muhammad Adel on Medium</title>
            <link>https://medium.com/@muhammadadel612?source=rss-9f530a2d2302------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 15:27:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muhammadadel612/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[Mastering VM Migration from VMware vSphere to OpenShift Virtualization via CLI]]></title>
            <link>https://medium.com/@muhammadadel612/mastering-vm-migration-from-vmware-vsphere-to-openshift-virtualization-via-cli-5176451b5bf9?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/5176451b5bf9</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[openshift-virtualization]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[redhat-openshift]]></category>
            <category><![CDATA[virtualization]]></category>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 14:29:18 GMT</pubDate>
            <atom:updated>2026-10-16T14:29:18.758Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-w_fQePOkJyl8n4b" /></figure><p>Migrating enterprise workloads from legacy hypervisors to modern Kubernetes-native platforms is becoming an industry standard. <strong>Migration Toolkit for Virtualization (MTV)</strong> — powered by the open-source <strong>Konveyor Forklift</strong> project — makes moving virtual machines from VMware vSphere to <strong>OpenShift Virtualization</strong> straightforward.</p><p>While the OpenShift Web Console provides an intuitive GUI, automating migrations at scale demands a solid grasp of the underlying Kubernetes CRDs (Custom Resource Definitions), CLI workflows, and debugging TLS/API constraints.</p><p>In this deep-dive guide, we walk through the exact architecture, the common pitfalls (such as internal TLS validation and unmapped network errors), and the complete, battle-tested manifests required for end-to-end VM migration.</p><h3>The Core Architecture: 5 Essential Components</h3><p>A reproducible MTV migration relies on five declarative components:</p><ol><li><strong>Credentials &amp; Secrets</strong>: Storing vCenter administrative access and handling cluster certificates.</li><li><strong>Providers</strong>: Connecting to the source (vCenter SDK endpoint) and destination (OpenShift API).</li><li><strong>StorageMap</strong>: Mapping vSphere Datastores (VMFS/NFS) to OpenShift StorageClasses.</li><li><strong>NetworkMap</strong>: Mapping vSphere PortGroups/Networks to OpenShift target networks (Pod network or Multus secondary interfaces).</li><li><strong>Plan &amp; Migration</strong>: Defining which VM to move, the target namespace, and triggering the data-transfer pipeline.</li></ol><pre>+--------------------+        +---------------------+<br>|  vCenter Provider  |        | Host / OCP Provider |<br>+---------+----------+        +----------+----------+<br>          |                              |<br>          +---------------+--------------+<br>                          |<br>             +------------v------------+<br>             | StorageMap &amp; NetworkMap |<br>             +------------+------------+<br>                          |<br>             +------------v------------+<br>             |     Migration Plan      |<br>             +------------+------------+<br>                          |<br>             +------------v------------+<br>             |    Migration CR (Run)   |<br>             +-------------------------+</pre><h3>🛠 Step-by-Step Implementation via CLI</h3><h3>Step 1: Configure Authentication &amp; Secrets</h3><p>The primary obstacle when configuring MTV via CLI is TLS certificate verification:</p><ul><li><strong>vCenter Self-Signed Certificates</strong>: vCenter often uses self-signed certificates or IP addresses lacking Subject Alternative Names (SANs). Setting insecureSkipVerify: &quot;true&quot; inside the secret solves this.</li><li><strong>OpenShift Internal CA</strong>: MTV’s controller needs the cluster’s internal Root CA to validate queries against [https://kubernetes.default.svc](https://kubernetes.default.svc).</li></ul><h4>1.1 Create the vCenter Secret</h4><pre>cat &lt;&lt;EOF | oc apply -f -<br>apiVersion: v1<br>kind: Secret<br>metadata:<br>  name: vcenter-credentials<br>  namespace: openshift-mtv<br>type: Opaque<br>stringData:<br>  user: &quot;administrator@vsphere.local&quot;<br>  password: &quot;YOUR_STRONG_PASSWORD&quot;<br>  insecureSkipVerify: &quot;true&quot;<br>EOF</pre><h4>1.2 Inject Cluster Root CA into the OpenShift Secret</h4><pre>oc patch secret openshift-secret -n openshift-mtv --type=merge -p \<br>  &quot;{\&quot;data\&quot;:{\&quot;cacert\&quot;:\&quot;$(oc get configmap kube-root-ca.crt -n openshift-mtv -o jsonpath=&#39;{.data.ca\.crt}&#39; | base64 -w 0)\&quot;}}&quot;</pre><h3>Step 2: Establish Source &amp; Destination Providers</h3><h4>2.1 The OpenShift Provider (host-provider)</h4><pre>apiVersion: forklift.konveyor.io/v1beta1<br>kind: Provider<br>metadata:<br>  name: host-provider<br>  namespace: openshift-mtv<br>spec:<br>  type: openshift<br>  url: https://kubernetes.default.svc<br>  secret:<br>    name: openshift-secret<br>    namespace: openshift-mtv<br>  settings:<br>    insecureSkipVerify: &quot;true&quot;</pre><h4>2.2 The vSphere Provider (vcenter-provider)</h4><pre>apiVersion: forklift.konveyor.io/v1beta1<br>kind: Provider<br>metadata:<br>  name: vcenter-provider<br>  namespace: openshift-mtv<br>spec:<br>  type: vsphere<br>  url: https://&lt;VCENTER_IP_OR_FQDN&gt;/sdk<br>  secret:<br>    name: vcenter-credentials<br>    namespace: openshift-mtv<br>  settings:<br>    insecureSkipVerify: &quot;true&quot;</pre><blockquote><strong><em>Verification:</em></strong><em> Ensure both providers report </em><em>Ready: True:</em></blockquote><pre>oc get providers -n openshift-mtv</pre><h3>Step 3: Discovering vCenter Inventory via Forklift API</h3><p>Before building your maps, you must query the exact vSphere resource IDs (network-*, datastore-*, and vm-*) discovered by Forklift&#39;s internal inventory service.</p><p>Extract the provider UID and query the inventory endpoint:</p><p>Bash</p><pre>PROVIDER_UID=$(oc get provider vcenter-provider -n openshift-mtv -o jsonpath=&#39;{.metadata.uid}&#39;)<br>TOKEN=$(oc whoami -t)</pre><pre><strong><em># List all VMs and their unique IDs</em></strong><br>oc exec -n openshift-mtv deployment/forklift-controller -c inventory -- \<br>  curl -sk -H &quot;Authorization: Bearer $TOKEN&quot; \<br>  &quot;https://forklift-inventory.openshift-mtv.svc:8443/providers/vsphere/${PROVIDER_UID}/vms&quot; | \<br>  jq -r &#39;.[] | &quot;\(.id)\t\(.name)&quot;&#39;</pre><pre><strong><em># Inspect a specific VM (Networks, Datastores, Disks)</em></strong><br>oc exec -n openshift-mtv deployment/forklift-controller -c inventory -- \<br>  curl -sk -H &quot;Authorization: Bearer $TOKEN&quot; \<br>  &quot;https://forklift-inventory.openshift-mtv.svc:8443/providers/vsphere/${PROVIDER_UID}/vms&quot; | \<br>  jq &#39;.[] | select(.name==&quot;TARGET_VM_NAME&quot;) | {id: .id, name: .name, networks: .networks, datastores: .datastores}&#39;</pre><pre><strong><em># List Datastores with their IDs</em></strong><br>oc exec -n openshift-mtv deployment/forklift-controller -c inventory -- \<br>  curl -sk -H &quot;Authorization: Bearer $TOKEN&quot; \<br>  &quot;https://forklift-inventory.openshift-mtv.svc:8443/providers/vsphere/${PROVIDER_UID}/datastores&quot; | \<br>  jq -r &#39;.[] | &quot;\(.id)\t\(.name)&quot;&#39;</pre><h3>Step 4: Define Storage and Network Mappings</h3><h4>4.1 StorageMap (storage-map.yaml)</h4><p>Map the source Datastore to your target OpenShift StorageClass (e.g., lvms-vg1 or Ceph/ODF):</p><pre>apiVersion: forklift.konveyor.io/v1beta1<br>kind: StorageMap<br>metadata:<br>  name: my-storage-map<br>  namespace: openshift-mtv<br>spec:<br>  provider:<br>    source:<br>      name: vcenter-provider<br>      namespace: openshift-mtv<br>    destination:<br>      name: host-provider<br>      namespace: openshift-mtv<br>  map:<br>    - source:<br>        id: datastore-6095       # Or by name: &quot;datastore1 (1)&quot;<br>      destination:<br>        storageClass: lvms-vg1</pre><h4>4.2 NetworkMap (network-map.yaml)</h4><p>Every virtual NIC attached to the VM in vSphere <strong>must</strong> have a corresponding entry in this map, otherwise the plan will fail with VMNetworksNotMapped.</p><pre>apiVersion: forklift.konveyor.io/v1beta1<br>kind: NetworkMap<br>metadata:<br>  name: my-network-map<br>  namespace: openshift-mtv<br>spec:<br>  provider:<br>    source:<br>      name: vcenter-provider<br>      namespace: openshift-mtv<br>    destination:<br>      name: host-provider<br>      namespace: openshift-mtv<br>  map:<br>    - source:<br>        name: &quot;VM Network&quot;       # Or by ID: &quot;network-6021&quot;<br>      destination:<br>        type: pod</pre><h3>Step 5: Define and Execute the Migration Plan</h3><h4>5.1 The Plan Manifest (migration-plan.yaml)</h4><pre>apiVersion: forklift.konveyor.io/v1beta1<br>kind: Plan<br>metadata:<br>  name: vm-migration-plan<br>  namespace: openshift-mtv<br>spec:<br>  provider:<br>    source:<br>      name: vcenter-provider<br>      namespace: openshift-mtv<br>    destination:<br>      name: host-provider<br>      namespace: openshift-mtv<br>  map:<br>    network:<br>      name: my-network-map<br>      namespace: openshift-mtv<br>    storage:<br>      name: my-storage-map<br>      namespace: openshift-mtv<br>  targetNamespace: default<br>  warm: false<br>  vms:<br>    - name: &quot;OCP12-w-1&quot;          # Or use id: &quot;vm-31005&quot;</pre><p>Verify that the plan status reaches <strong>Ready</strong>:</p><pre>oc get plan vm-migration-plan -n openshift-mtv<br># Output: READY: True</pre><h4>5.2 Trigger the Migration (migration-run.yaml)</h4><pre>apiVersion: forklift.konveyor.io/v1beta1<br>kind: Migration<br>metadata:<br>  name: vm-migration-run-1<br>  namespace: openshift-mtv<br>spec:<br>  plan:<br>    name: vm-migration-plan<br>    namespace: openshift-mtv</pre><p>Apply the file to start the transfer:</p><pre>oc apply -f migration-run.yaml</pre><h3>🏁 Summary</h3><p>Migrating virtual machines via GitOps and Kubernetes manifests offers repeatable, automated workflows for data center migrations. By standardizing your Provider, StorageMap, and NetworkMap configurations and handling TLS requirements early, executing multi-VM migration plans becomes predictable and robust.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5176451b5bf9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging Virtual Machines in OpenShift: How CoreDNS Powers VM-to-VM Networking]]></title>
            <link>https://medium.com/@muhammadadel612/bridging-virtual-machines-in-openshift-how-coredns-powers-vm-to-vm-networking-37036e1a3d12?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/37036e1a3d12</guid>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[red-hat-openshift]]></category>
            <category><![CDATA[redhat-openshift]]></category>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 08:29:43 GMT</pubDate>
            <atom:updated>2026-09-26T08:29:43.391Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FZzkZKiMccPvZQoJWkqYKw.jpeg" /></figure><p>Running legacy enterprise applications often means managing virtual machines alongside containerized microservices. Red Hat OpenShift Container Platform with <strong>OpenShift Virtualization</strong> (CNV / KubeVirt) lets you run both workloads under a single control plane.</p><p>A common architectural challenge is service discovery and name resolution between VMs. When VMs communicate across namespaces or inside the same pod network, relying on ephemeral IP addresses is fragile. OpenShift’s internal <strong>CoreDNS</strong> cluster service solves this by treating VMs like native Kubernetes pods, enabling predictable DNS resolution out of the box.</p><h3>The Networking Architecture: How VMs Get Identities</h3><p>In OpenShift Virtualization, every VM instance runs inside a wrapper pod called virt-launcher. By default, VMs attach to the primary Kubernetes SDN/OVN-Kubernetes pod network through a bridge or masquerade interface.</p><p>Because the underlying workload is enclosed in a Kubernetes pod, OpenShift provides standard Kubernetes primitives:</p><ul><li><strong>Pod DNS Integration:</strong> CoreDNS exposes internal service domains formatted as &lt;service-name&gt;.&lt;namespace&gt;.svc.cluster.local.</li><li><strong>Headless Services:</strong> A Service configured with clusterIP: None maps DNS A/AAAA records directly to the IP addresses of the matching pods/VMs rather than routing through a virtual proxy IP.</li><li><strong>KubeVirt Subdomain Routing:</strong> When a VM pod specifies a hostname and subdomain, CoreDNS registers a dedicated A-record for that specific VM instance.</li></ul><pre>+---------------------------------------------+<br>       |             OpenShift CoreDNS               |<br>       |  (Resolves *.my-vms.prod.svc.cluster.local) |<br>       +----------------------+----------------------+<br>                              |<br>            +-----------------+-----------------+<br>            |                                   |<br>            v                                   v<br>  +--------------------+              +--------------------+<br>  |   VM 1 (web-01)    |              |   VM 2 (db-01)     |<br>  | IP: 10.128.2.45    |              | IP: 10.129.0.18    |<br>  | virt-launcher Pod  |              | virt-launcher Pod  |<br>  +--------------------+              +--------------------+</pre><h3>Step 1: Establish the Service Endpoint</h3><p>To resolve individual VMs by hostname within a namespace or across the cluster, define a <strong>Headless Service</strong>. CoreDNS queries this service to return the direct IPs of every backing VM.</p><p>Create vm-headless-service.yaml:</p><p>YAML</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: vm-mesh<br>  namespace: vm-workloads<br>spec:<br>  clusterIP: None<br>  selector:<br>    app.kubernetes.io/part-of: vm-mesh<br>  ports:<br>    - name: ssh<br>      port: 22<br>      targetPort: 22<br>    - name: http<br>      port: 80<br>      targetPort: 80<br>    - name: postgres<br>      port: 5432<br>      targetPort: 5432</pre><p>Applying this manifest registers vm-mesh.vm-workloads.svc.cluster.local in CoreDNS.</p><h3>Step 2: Configure VirtualMachine Specs for DNS Registration</h3><p>For CoreDNS to generate individual instance host records (such as db-server.vm-mesh.vm-workloads.svc.cluster.local), configure the hostname and subdomain attributes inside the VM&#39;s template.spec. The subdomain must match the headless service name.</p><p>Create database-vm.yaml:</p><p>YAML</p><pre>apiVersion: kubevirt.io/v1<br>kind: VirtualMachine<br>metadata:<br>  name: db-server<br>  namespace: vm-workloads<br>spec:<br>  running: true<br>  template:<br>    metadata:<br>      labels:<br>        app.kubernetes.io/part-of: vm-mesh<br>    spec:<br>      hostname: db-server<br>      subdomain: vm-mesh<br>      domain:<br>        devices:<br>          interfaces:<br>            - name: default<br>              masquerade: {}<br>          disks:<br>            - name: rootdisk<br>              disk:<br>                bus: virtio<br>        resources:<br>          requests:<br>            memory: 4Gi<br>            cpu: 2<br>      networks:<br>        - name: default<br>          pod: {}</pre><p>Create web-vm.yaml:</p><p>YAML</p><pre>apiVersion: kubevirt.io/v1<br>kind: VirtualMachine<br>metadata:<br>  name: web-server<br>  namespace: vm-workloads<br>spec:<br>  running: true<br>  template:<br>    metadata:<br>      labels:<br>        app.kubernetes.io/part-of: vm-mesh<br>    spec:<br>      hostname: web-server<br>      subdomain: vm-mesh<br>      domain:<br>        devices:<br>          interfaces:<br>            - name: default<br>              masquerade: {}<br>          disks:<br>            - name: rootdisk<br>              disk:<br>                bus: virtio<br>        resources:<br>          requests:<br>            memory: 2Gi<br>            cpu: 1<br>      networks:<br>        - name: default<br>          pod: {}</pre><h3>Step 3: Verify CoreDNS Resolution from Inside the VM</h3><p>When OpenShift spins up the virt-launcher pod, the guest OS inherits its DNS nameserver configuration pointing to the cluster&#39;s internal CoreDNS service IP (typically configured via cloud-init or DHCP within the pod network).</p><p>Connect to the console of web-server:</p><p>Bash</p><pre>virtctl console web-server -n vm-workloads</pre><p>Inside the guest shell, inspect the DNS search domain in /etc/resolv.conf:</p><p>Bash</p><pre>cat /etc/resolv.conf<br># nameserver 172.30.0.10<br># search vm-workloads.svc.cluster.local svc.cluster.local cluster.localTest resolving and connecting directly to db-server:</pre><p>Bash</p><pre># Query the fully qualified domain name (FQDN)<br>nslookup db-server.vm-mesh.vm-workloads.svc.cluster.local</pre><pre># Short domain resolution (within the same namespace)<br>ping -c 3 db-server.vm-mesh</pre><pre># Connecting over PostgreSQL port<br>curl -v telnet://db-server.vm-mesh:5432</pre><h3>Key Scenarios &amp; Gotchas</h3><ul><li><strong>Secondary Networks (SR-IOV / OVS / Macvlan):</strong> CoreDNS natively only manages IPs allocated via the primary default pod network. If VMs communicate over dedicated secondary network interfaces via Multus, CoreDNS will <strong>not</strong> track those secondary interface IPs automatically without additional operators (such as Kube-secondary-dns or metallb/external DNS plugins).</li><li><strong>Cross-Namespace Resolution:</strong> Always use the full FQDN (&lt;hostname&gt;.&lt;subdomain&gt;.&lt;namespace&gt;.svc.cluster.local) when communicating across namespace boundaries to avoid reliance on the local search list.</li><li><strong>Network Policies:</strong> Pod network security rules apply directly to VM workloads. If ping or connections fail between VMs despite correct DNS resolution, ensure an OpenShift NetworkPolicy is not blocking ingress traffic on target ports.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37036e1a3d12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Multihomed Virtual Machines in OpenShift Virtualization (CNV): A Step-by-Step Guide]]></title>
            <link>https://medium.com/@muhammadadel612/mastering-multihomed-virtual-machines-in-openshift-virtualization-cnv-a-step-by-step-guide-f902be33dcdc?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/f902be33dcdc</guid>
            <category><![CDATA[openshift-virtualization]]></category>
            <category><![CDATA[nmstate-operator]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[red-hat-openshift]]></category>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 22:46:21 GMT</pubDate>
            <atom:updated>2026-09-22T23:10:37.969Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c2T0F44heZiXW5X8VsGz_g.jpeg" /></figure><p>When migrating enterprise workloads from legacy hypervisors like VMware or Red Hat Virtualization to <strong>OpenShift Virtualization</strong> (formerly Container Native Virtualization / CNV), one core requirement surfaces immediately: <strong>multihoming</strong>.</p><p>Enterprise VMs rarely live on a single network interface. They often require a primary interface for pod-network management and secondary interfaces connected directly to external VLANs for storage traffic, backup networks, or isolated tenant communications.</p><p>This guide covers the architecture, manifests, and step-by-step workflow for configuring multihomed Virtual Machines in OpenShift using <strong>Multus CNI</strong>, <strong>NMState</strong>, and <strong>OpenShift Virtualization</strong>.</p><h3>The Architectural Big Picture</h3><p>By default, every Virtual Machine running in OpenShift receives a primary network interface connected to the OVN-Kubernetes pod network.</p><p>To attach secondary interfaces directly to physical VLANs or external networks, OpenShift uses <strong>Multus CNI</strong> — a meta-plugin that allows pods and VMs to have multiple network interfaces.</p><p>Here is the flow to attach a secondary network to a VM:</p><ol><li><strong>Node Network Configuration Policy (NNCP):</strong> Configures physical bridge interfaces or VLAN tags on the underlying Red Hat Enterprise Linux CoreOS (RHCOS) worker nodes.</li><li><strong>Network Attachment Definition (NAD):</strong> Defines the secondary network CRD for Kubernetes/Multus inside a target namespace.</li><li><strong>VirtualMachine Manifest:</strong> References both the primary pod network and the secondary network attachment.</li></ol><h3>Step 1: Configure the Worker Node Network (NNCP)</h3><p>Before attaching a network interface to a VM, the underlying OpenShift worker nodes must expose a Linux bridge or VLAN interface. We use the <strong>Kubernetes NMState Operator</strong> to apply declarative network configurations to nodes.</p><p>Create a file named 01-node-network-policy.yaml:</p><pre>apiVersion: nmstate.io/v1<br>kind: NodeNetworkConfigurationPolicy<br>metadata:<br>    name: br0-ovs-bridge-policy<br>spec:<br>   nodeSelector:<br>     node-role.kubernetes.io/worker: &quot;&quot;<br>   desiredState:<br>    interfaces:<br>    - name: br0<br>      bridge:<br>         options: {}<br>         port:<br>         - name: ens4<br>      ipv4:<br>         dhcp: &quot;true&quot;<br>         enabled: &quot;true&quot;<br>      state: up<br>      type: ovs-bridge<br>   ovn:<br>     bridge-mappings:<br>     - bridge: br0<br>       localnet: br0-network<br>       state: present</pre><p>Apply the policy:</p><pre>oc apply -f 01-node-network-policy.yaml</pre><blockquote><strong><em>Verification:</em></strong><em> Check that the policy reached an </em><em>Available state:</em></blockquote><pre>oc get nncp br-vlan100-policy</pre><h3>Step 2: Create the Network Attachment Definition (NAD)</h3><p>Now that the physical nodes have the bridge br-vlan100, expose it to Multus using a NetworkAttachmentDefinition.</p><p>Create 02-network-attachment-def.yaml:</p><pre>apiVersion: k8s.cni.cncf.io/v1<br>kind: NetworkAttachmentDefinition<br>metadata:<br>    name: br0-network<br>    namespace: network-multihomed<br>spec:<br>    config: |-<br>     { <br>      &quot;cniVersion&quot;: &quot;0.4.0&quot;,<br>      &quot;name&quot;: &quot;br0-network&quot;,<br>      &quot;type&quot;: &quot;ovn-k8s-cni-overlay&quot;,<br>      &quot;netAttachDefName&quot;: &quot;network-multihomed/br0-network&quot;,<br>      &quot;topology&quot;: &quot;localnet&quot;<br>     }</pre><p>Apply the manifest to the namespace where your VMs will live:</p><pre>oc apply -f 02-network-attachment-def.yaml -n vm-workloads</pre><p><em>Note: For OpenShift Virtualization, using </em><em>&quot;type&quot;: &quot;cnv-bridge&quot; is the recommended binding mechanism as it offers optimal performance and feature compatibility with KVM/QEMU.</em></p><h3>Step 3: Define the Multihomed VirtualMachine Manifest</h3><p>With the node-level network and Multus definition in place, bind both interfaces inside the VirtualMachine manifest.</p><ul><li><strong>Interface 1 (</strong><strong>default):</strong> Connected to pod network for Kubernetes management.</li><li><strong>nterface 2 (</strong><strong>secondary-vlan):</strong> Bound to vlan100-network using the bridge binding type.</li></ul><p>Create 03-multihomed-vm.yaml:</p><pre>apiVersion: kubevirt.io/v1<br>kind: VirtualMachine<br>metadata:<br>  name: rhel-multihomed-server<br>  namespace: vm-workloads<br>  labels:<br>    app: multi-nic-vm<br>spec:<br>  running: true<br>  template:<br>    metadata:<br>      labels:<br>        kubevirt.io/domain: rhel-multihomed-server<br>    spec:<br>      domain:<br>        devices:<br>          disks:<br>            - name: datavolumedisk1<br>              disk:<br>                bus: virtio<br>          interfaces:<br>            # Primary Pod Network Interface<br>            - name: default<br>              masquerade: {}<br>            # Secondary VLAN Interface<br>            - name: secondary-vlan<br>              bridge: {}<br>        resources:<br>          requests:<br>            memory: 4Gi<br>            cpu: &quot;2&quot;<br>      networks:<br>        # Binding Primary Interface to OVN-Kubernetes<br>        - name: default<br>          pod: {}<br>        # Binding Secondary Interface to Multus NAD<br>        - name: secondary-vlan<br>          multus:<br>            networkName: vlan100-network<br>      volumes:<br>        - name: datavolumedisk1<br>          dataVolume:<br>            name: rhel9-base-dv</pre><p>Apply the manifest to deploy the VM:</p><pre>oc apply -f 03-multihomed-vm.yaml -n vm-workloads</pre><h3>Verification &amp; Interface Discovery</h3><p>Once the VM is running, inspect the active VMI (VirtualMachineInstance) status to verify that both network interfaces were provisioned and assigned MAC addresses:</p><pre>oc get vmi rhel-multihomed-server -n vm-workloads -o jsonpath=&#39;{.status.interfaces}&#39; | jq</pre><p><strong>Expected Output:</strong></p><pre>[<br>  {<br>    &quot;ipAddress&quot;: &quot;10.128.2.45&quot;,<br>    &quot;ipAddresses&quot;: [<br>      &quot;10.128.2.45&quot;<br>    ],<br>    &quot;mac&quot;: &quot;52:54:00:ab:cd:01&quot;,<br>    &quot;name&quot;: &quot;default&quot;,<br>    &quot;queueCount&quot;: 1<br>  },<br>  {<br>    &quot;interfaceName&quot;: &quot;eth1&quot;,<br>    &quot;mac&quot;: &quot;52:54:00:ef:12:34&quot;,<br>    &quot;name&quot;: &quot;secondary-vlan&quot;,<br>    &quot;queueCount&quot;: 1<br>  }<br>]</pre><p>Inside the VM operating system, running ip addr will reveal eth0 (management network) and eth1 (unconfigured secondary network ready for static IP allocation or DHCP).</p><h3>Key Takeaways</h3><ul><li><strong>Decouple Node and Workload Configs:</strong> Always use <strong>NMState (NNCP)</strong> for physical node network preparation and <strong>NADs</strong> for Kubernetes-level attachment.</li><li><strong>Binding Types:</strong> Use the bridge binding type under VM interfaces alongside &quot;type&quot;: &quot;cnv-bridge&quot; in the NAD for native layer-2 performance.</li><li><strong>Namespace Isolation:</strong> NetworkAttachmentDefinitions are namespace-scoped. If you need shared networks across multiple projects, deploy the NAD in the default namespace or duplicate it per project.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f902be33dcdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Production-Ready Single Node OpenShift (SNO) Cluster: A Hands-On Guide]]></title>
            <link>https://medium.com/@muhammadadel612/building-a-production-ready-single-node-openshift-sno-cluster-a-hands-on-guide-cd94c9df6885?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd94c9df6885</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[redhat-openshift]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[openshift-cluster]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Fri, 18 Sep 2026 15:01:06 GMT</pubDate>
            <atom:updated>2026-09-18T17:54:33.954Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dx8drwhBCNu8&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fx8drwhBCNu8" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2ac739327c7c15f82486b7eeaca06c6/href">https://medium.com/media/c2ac739327c7c15f82486b7eeaca06c6/href</a></iframe><p>Deploying a multi-node enterprise Red Hat OpenShift cluster requires significant compute, memory, and storage footprints. For edge computing, remote locations, labs, or resource-constrained environments, <strong>Single Node OpenShift (SNO)</strong> packages the entire OpenShift control plane and worker workloads onto a single physical or virtual host without losing core enterprise features.</p><p>In this guide, we will step through provisioning a production-ready SNO cluster on bare metal or a hypervisor (such as VMware ESXi or KVM).</p><h3>1. Prerequisites and System Requirements</h3><p>To ensure a smooth deployment, ensure your target host meets these baseline specifications:</p><ul><li><strong>CPU:</strong> Minimum 8 vCPUs (16 vCPUs recommended)</li><li><strong>RAM:</strong> Minimum 32 GB (64 GB recommended)</li><li><strong>Storage:</strong> Primary disk of 120+ GB for CoreOS and container workloads, plus optional additional drives for persistent storage</li><li><strong>Network:</strong> Static IP allocation with proper forward and reverse DNS records</li><li><strong>Red Hat Account:</strong> Pull secret retrieved from <a href="https://www.google.com/search?q=https://console.redhat.com&amp;utm_source=gemini">console.redhat.com</a></li></ul><h3>2. DNS Infrastructure Setup</h3><p>OpenShift relies heavily on DNS routing. For SNO, create the following DNS A/AAAA records pointing to your single host’s IP address (e.g., 192.168.22.10):</p><p><strong>Foreward lookup zone:</strong></p><pre>@ IN NS ns1.ocp.lan.<br>ns1 IN A 192.168.22.1<br>; OpenShift Cluster Records (sno.ocp.lan)<br>sno IN A 192.168.22.10<br>api.sno IN A 192.168.22.10<br>api-int.sno IN A 192.168.22.10<br>*.apps.sno IN A 192.168.22.10<br>; Mirror Registry Record<br>quay.lab.ocp.lan. IN A 192.168.22.250</pre><p><strong>Reverse lookup zone:</strong></p><pre>@   IN  NS  ns1.lab.ocp.lan.<br><br>; Pointer Records (PTR)<br>1   IN  PTR ns1.lab.ocp.lan.<br>10  IN  PTR sno.lab.ocp.lan.<br>10  IN  PTR api.sno.lab.ocp.lan.<br>10  IN  PTR api-int.sno.ocp.lan.<br>250 IN  PTR quay.lab.ocp.lan.</pre><h3>3. Haproxy Setup</h3><pre># 1. Kubernetes API Server (Port 6443)<br>frontend k8s_api_frontend<br>    bind 192.168.22.1:6443<br>    mode tcp<br>    default_backend k8s_api_backend<br><br>backend k8s_api_backend<br>    mode tcp<br>    balance roundrobin<br>    server sno-node 192.168.22.10:6443 check<br><br># 2. Machine Config / Ignition Server (Port 22623)<br>frontend machine_config_frontend<br>    bind 192.168.22.1:22623<br>    mode tcp<br>    default_backend machine_config_backend<br><br>backend machine_config_backend<br>    mode tcp<br>    balance roundrobin<br>    server sno-node 192.168.22.10:22623 check<br><br># 3. HTTP Traffic / Apps (Port 80)<br>frontend http_apps_frontend<br>    bind 192.168.22.1:80<br>    mode tcp<br>    default_backend http_apps_backend<br><br>backend http_apps_backend<br>    mode tcp<br>    balance roundrobin<br>    server sno-node 192.168.22.10:80 check<br><br># 4. HTTPS Traffic / Apps (Port 443)<br>frontend https_apps_frontend<br>    bind 192.168.22.1:443<br>    mode tcp<br>    default_backend https_apps_backend<br><br>backend https_apps_backend<br>    mode tcp<br>    balance roundrobin<br>    server sno-node 192.168.22.10:443 check</pre><h3>4. Creating the Installation Configuration</h3><p>Prepare an install-config.yaml file to instruct the OpenShift installer to configure a single-node topology:</p><pre>apiVersion: v1<br>baseDomain: ocp.lan<br>compute:<br>  - hyperthreading: Enabled<br>    name: worker<br>    replicas: 0 # Must be set to 0 for User Provisioned Installation as worker nodes will be manually deployed.<br>controlPlane:<br>  hyperthreading: Enabled<br>  name: master<br>  replicas: 1<br>metadata:<br>  name: sno # Cluster name<br>networking:<br>  clusterNetwork:<br>    - cidr: 10.128.0.0/14<br>      hostPrefix: 23<br>  networkType: OVNKubernetes<br>  serviceNetwork:<br>    - 172.30.0.0/16<br>  machineNetwork:<br>  - cidr: 192.168.22.0/24<br>platform:<br>  none: {}<br>bootstrapInPlace:<br>  installationDisk: /dev/sda<br>fips: false<br>pullSecret: &#39;{&quot;auths&quot;:{}}&#39;<br>sshKey: &quot;&quot;<br>additionalTrustBundle: |<br>  -----BEGIN CERTIFICATE-----<br>  <br>  -----END CERTIFICATE-----<br><br>imageDigestSources:<br>- mirrors:<br>  - quay.lab.ocp.lan:8443/admin/ocp4/openshift4<br>  source: quay.io/openshift-release-dev/ocp-v4.0-art-dev<br>- mirrors:<br>  - quay.lab.ocp.lan:8443/admin/ocp4/openshift4<br>  source: quay.io/openshift-release-dev/ocp-release<br><br></pre><p><strong>Important:</strong> Setting controlPlane.replicas: 1 and compute.replicas: 0 signals to the installer that all control plane and worker components will run co-located on the single node.</p><h3><strong>5. Deployment Workflow</strong></h3><ol><li><strong>Generate Ignition Configs:</strong>‏ Prerequisite for ISO embed.</li></ol><p>Create a backup of your install-config.yaml file, then run the installer binary to generate the single-node ignition manifest:</p><pre>mkdir ocp-install<br>cp install-config.yaml ocp-install/<br>./openshift-install create single-node-ignition-config --dir=ocp-install</pre><p><strong>2. Embed Ignition into CoreOS ISO: </strong>‏Prepare boot media.</p><p>Download the Red Hat Enterprise Linux CoreOS (RHCOS) Live ISO matching your target OpenShift version. Embed the generated bootstrap-in-place-for-live-iso.ign into the ISO using coreos-installer:</p><p>Bash</p><pre>podman run --privileged --rm -v /root/ocp-install:/data quay.io/coreos/coreos-installer:release iso ignition embed -fi /data/bootstrap-in-place-for-live-iso.ign /data/rhcos-live.iso</pre><p><strong>3. download this new RHCOS image and boot your new SNO from it.</strong></p><p><strong>4. Assign static IP Address to SNO machine and add it to reserved DHCP server</strong></p><p><strong>5. Power on SNO node</strong></p><h3><strong>Boot Node &amp; Monitor Installation: ‏Automated provisioning.</strong></h3><p>Attach sno-installer.iso to your bare-metal server (via IPMI/iLO/vKVM) or Virtual Machine, then power it on. The automated installer writes RHCOS to disk, reboots into the installed OS, and bootstraps the OpenShift control plane in place.</p><p>Monitor installation progress from your management workstation:</p><pre>./openshift-install --dir=cluster-configs wait-for install-complete</pre><h3>Post-Installation Verification</h3><p>Once the deployment finishes, export the generated kubeconfig to interact with your cluster:</p><pre>export KUBECONFIG=./cluster-configs/auth/kubeconfig<br>oc get nodes</pre><p>The output confirms your single control-plane host acting as both master and worker:</p><p>Plaintext</p><pre>NAME              STATUS   ROLES                   AGE   VERSION<br>sno.lab.ocp.lan   Ready    control-plane,master,worker   45m   v1.31.0</pre><p>Access your web console by navigating to [https://console-openshift-console.apps.sno.example.com](https://console-openshift-console.apps.sno.example.com) and log in using the kubeadmin credentials located in ./cluster-configs/auth/kubeadmin-password.</p><p>Single Node OpenShift provides a compact, fully compliant Kubernetes environment that reduces operational overhead while retaining the robust declarative management features of OpenShift Container Platform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd94c9df6885" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Kubernetes Across Clouds: A Deep Dive into Red Hat Advanced Cluster Management (RHACM)]]></title>
            <link>https://medium.com/@muhammadadel612/scaling-kubernetes-across-clouds-a-deep-dive-into-red-hat-advanced-cluster-management-rhacm-967ace96b664?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/967ace96b664</guid>
            <category><![CDATA[acm]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[advancedclustermanagement]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Tue, 25 Aug 2026 22:55:08 GMT</pubDate>
            <atom:updated>2026-08-25T22:55:08.083Z</atom:updated>
            <content:encoded><![CDATA[<p>​Running a single Kubernetes cluster in production is challenging; operating dozens across AWS, Azure, on-premises bare metal, and edge environments often leads to configuration drift, fragmented security visibility, and operational burnout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*45zzeNC6wdPJrm27ZuRWlw.png" /></figure><h3><strong>​Red Hat Advanced Cluster Management for Kubernetes (RHACM)</strong></h3><p>provides an enterprise-grade control plane that acts as a unified management hub across your entire hybrid cloud fleet.</p><h3><strong>​Architectural Foundation: Hub and Spoke Model</strong></h3><h3>​RHACM uses a centralized Hub-and-Spoke architecture:</h3><ul><li>​<strong>Hub Cluster: </strong>The central OpenShift cluster hosting the RHACM operators, Web Console, policy compilers, search indexers, and global controllers.</li><li><strong>​Managed Clusters (Spokes): </strong>Target Kubernetes clusters (OpenShift, EKS, AKS, GKE, or native CNCF-compliant distributions) running lightweight Klusterlet agents that communicate back to the Hub.</li></ul><h3>​The Four Pillars of RHACM</h3><h3>​1. Unified Cluster Lifecycle Management</h3><p>​RHACM abstracts infrastructure provisioning via declarative APIs and integrations with cloud providers.</p><ul><li><strong>​Fleet-Wide Provisioning: </strong>Deploy OpenShift clusters to bare metal (Assisted Installer), AWS, GCP, Azure, or VMware vSphere directly from one interface.</li><li><strong>​Hosted Control Planes (HyperShift):</strong> Decouple control planes from worker nodes, reducing compute overhead and drastically cutting down cluster deployment times.</li><li><strong>​Day-2 Operations: </strong>Standardize cluster upgrades, worker pool scaling, and cluster hibernation schedules across clouds.</li></ul><h3>​2. Policy-Based Governance, Risk, and Compliance (GRC)</h3><p>​Instead of manually validating configurations, RHACM continuously enforces desired states across every cluster.</p><ul><li>​<strong>Inform vs. Enforce: </strong>Policies can passively audit violations or actively self-heal deviations (e.g., auto-recreating missing RBAC roles or NetworkPolicies).</li><li>​<strong>Standard Compliances:</strong> Out-of-the-box support for CIS Benchmarks, NIST SP 800-53, HIPAA, and PCI-DSS compliance frameworks.</li><li>​<strong>Open Policy Agent (OPA) Integration: </strong>Seamlessly deploy OPA Gatekeeper constraints across target clusters using GitOps workflows.</li></ul><h3>​3. Advanced Application Lifecycle Management</h3><p>​<strong>RHACM</strong> decouples application architecture from underlying physical infrastructure using placement rules.</p><ul><li>​<strong>Placement Rules &amp; Bindings: </strong>Deploy workloads dynamically based on cluster labels (e.g., environment: prod, region: emea, pci-compliant: &quot;true&quot;).</li><li><strong>​GitOps &amp; OpenShift GitOps (Argo CD):</strong> Synchronize multi-cluster application states directly from Git repositories with pull-request-driven workflows.</li></ul><h3>​4. Multi-Cluster Observability (MCO)</h3><p>​Single-cluster Prometheus instances fragment metrics. RHACM centralizes telemetry using Thanos and S3-compatible object storage (such as OpenShift Data Foundation / NooBaa or AWS S3).</p><ul><li>​Aggregated Grafana dashboards display fleet-wide compute utilization, API latency, and node health.</li><li>​Centralized dynamic search enables filtering and locating any Kubernetes resource (Pod, Secret, Route, VirtualMachine) across hundreds of clusters in milliseconds.</li></ul><h3>Bringing It Together: The Ecosystem Value</h3><p>​When paired with Red Hat OpenShift GitOps, Ansible Automation Platform (AAP), and Red Hat Advanced Cluster Security (RHACS), RHACM completes the foundation for modern platform engineering:</p><ul><li><strong>​Ansible Automation Platform Integration: </strong>Trigger external infrastructure playbooks (e.g., configuring load balancers or provisioning external databases) during cluster provisioning hooks.</li><li>​<strong>OpenShift Virtualization Management:</strong> Centrally inventory, live-migrate, and manage KubeVirt virtual machines alongside containerized workloads across the entire fleet.</li></ul><p><strong>​RHACM transforms disparate Kubernetes environments into a cohesive, policy-driven fleet, lowering operational overhead while maximizing consistency and compliance across the hybrid cloud.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=967ace96b664" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building and Pushing Container Images with Tekton Pipelines, Buildah, and Docker Hub]]></title>
            <link>https://medium.com/@muhammadadel612/building-and-pushing-container-images-with-tekton-pipelines-buildah-and-docker-hub-09fe188d28e3?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/09fe188d28e3</guid>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Tue, 18 Aug 2026 21:00:31 GMT</pubDate>
            <atom:updated>2026-08-18T21:19:10.200Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*OYJlWACIi9tWGUHG4Enh3A.jpeg" /></figure><p>Tekton is a powerful, Kubernetes-native open-source framework for creating continuous integration and continuous delivery (CI/CD) systems. Unlike traditional CI/CD engines, Tekton executes each step inside standard Kubernetes containers.<br>​When building container images inside Kubernetes, running standard Docker commands requires exposing the host’s Docker daemon (/var/run/docker.sock), which presents significant security risks. Buildah solves this by building OCI and Docker-compliant images without requiring root privileges or a Docker daemon.</p><h3>​Architecture Overview</h3><p>[ GitHub Repo ] ──(git-clone task)──&gt; [ Workspace (PVC) ] ──(buildah task)──&gt; [ Docker Hub ]<br> <br> with [ DockerRegistry Secret ]</p><ol><li><strong>​git-clone Task</strong>: Clones the source code from GitHub into a shared Persistent Volume Claim (PVC).</li><li>​<strong>buildah Task</strong>: Reads the Dockerfile and source files from the workspace, builds the image, and pushes it directly to Docker Hub using the mounted registry secret.</li></ol><h3>Prerequisite</h3><ol><li>​A running Kubernetes cluster.</li><li>​Tekton Pipelines installed (kubectl apply -f [https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml](https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml)).</li><li>​Tekton CLI (tkn) installed locally.</li></ol><p>4. ​A Docker Hub account.</p><h3>​Step 1: Configure Docker Hub Credentials</h3><p>​Tekton supports native Kubernetes secrets annotated for specific container registries. When configured, Tekton automatically handles Docker authentication without needing custom docker login commands in your scripts.<br>​Create docker-secret.yaml:</p><pre>apiVersion: v1<br>kind: Secret<br>metadata:<br>  name: dockerhub-credentials<br>  annotations:<br>    tekton.dev/docker-0: https://index.docker.io/v1/<br>type: kubernetes.io/basic-auth<br>stringData:<br>  username: &lt;YOUR_DOCKERHUB_USERNAME&gt;<br>  password: &lt;YOUR_DOCKERHUB_ACCESS_TOKEN_OR_PASSWORD&gt;<br></pre><p>Apply the secret and attach it to a service account:</p><pre>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  name: tekton-build-sa<br>secrets:<br>  - name: dockerhub-credentials<br></pre><p>Apply these to your cluster:</p><pre>kubectl apply -f docker-secret.yaml</pre><h3>Step 2: Install Catalog Tasks</h3><p>​Tekton provides a set of pre-built community tasks via the Tekton Catalog. Install both <strong>git-clone</strong> and <strong>buildah</strong>:</p><pre># Install git-clone task<br>kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.9/git-clone.yaml</pre><pre># Install buildah task<br>kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/buildah/0.9/buildah.yaml</pre><h3>Step 3: Define the Pipeline</h3><p>​Create a Tekton Pipeline that strings the tasks together and links them via a shared workspace.<br>​Create build-and-push-pipeline.yaml:</p><pre>apiVersion: tekton.dev/v1beta1<br>kind: Pipeline<br>metadata:<br>  name: build-and-push-pipeline<br>spec:<br>  description: |<br>    Clones a Git repository from GitHub, builds an image using Buildah,<br>    and pushes the resulting image to Docker Hub.<br>  params:<br>    - name: repo-url<br>      type: string<br>      description: The Git repository URL to clone<br>    - name: image-reference<br>      type: string<br>      description: Target Docker image name (e.g., docker.io/username/app:tag)<br>  workspaces:<br>    - name: shared-workspace<br>  tasks:<br>    - name: fetch-source<br>      taskRef:<br>        name: git-clone<br>      workspaces:<br>        - name: output<br>          workspace: shared-workspace<br>      params:<br>        - name: url<br>          value: $(params.repo-url)<br>        - name: revision<br>          value: main</pre><p>Apply the pipeline:</p><pre>kubectl apply -f build-and-push-pipeline.yaml<br></pre><h3>Step 4: Run the Pipeline with a PipelineRun</h3><p>​To trigger the pipeline, create a PipelineRun that supplies the runtime parameters, requests storage, and specifies the ServiceAccount containing the Docker credentials.<br>​Create pipelinerun.yaml:</p><pre>apiVersion: tekton.dev/v1beta1<br>kind: PipelineRun<br>metadata:<br>  generateName: build-and-push-run-<br>spec:<br>  pipelineRef:<br>    name: build-and-push-pipeline<br>  serviceAccountName: tekton-build-sa<br>  params:<br>    - name: repo-url<br>      value: &quot;https://github.com/&lt;YOUR_GITHUB_USER&gt;/&lt;YOUR_REPO&gt;.git&quot;<br>    - name: image-reference<br>      value: &quot;docker.io/&lt;YOUR_DOCKERHUB_USERNAME&gt;/&lt;IMAGE_NAME&gt;:latest&quot;<br>  workspaces:<br>    - name: shared-workspace<br>      volumeClaimTemplate:<br>        spec:<br>          accessModes:<br>            - ReadWriteOnce<br>          resources:<br>            requests:<br>              storage: 1Gi<br></pre><p>Start the execution:</p><pre>kubectl create -f pipelinerun.yaml<br></pre><p>Step 5: Monitor Pipeline Execution<br>​Check the logs in real time using the tkn CLI:</p><pre># View active runs<br>tkn pipelinerun list</pre><pre># Follow logs interactively<br>tkn pipelinerun logs -f -L<br></pre><p>Once the run completes successfully, check your Docker Hub repository to verify that the newly built tag is published.</p><h3>​Best Practices &amp; Tips</h3><ul><li>​<strong>Use Personal Access Tokens (PAT)</strong>: Instead of your Docker Hub account password, create a scoped Personal Access Token in Docker Hub under Account Settings &gt; Security &gt; New Access Token.</li><li>​<strong>Storage Isolation</strong>: Using volumeClaimTemplate ensures an isolated, temporary volume is allocated dynamically for each run and cleaned up with the pipeline.</li><li>​<strong>Multi-Arch Builds</strong>: If building for multiple platforms (e.g., ARM64/AMD64), Buildah supports --platform flags directly within custom task definitions.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09fe188d28e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenShift Data Guard: Mastering Backup & Restore with CSI PVC Snapshots]]></title>
            <link>https://medium.com/@muhammadadel612/openshift-data-guard-mastering-backup-restore-with-csi-pvc-snapshots-041455af74df?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/041455af74df</guid>
            <category><![CDATA[pvc]]></category>
            <category><![CDATA[snapshot]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[pvc-snapshot]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 17:57:29 GMT</pubDate>
            <atom:updated>2026-06-24T17:57:29.660Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1DQTh0NYYM2t9108j4IJQ.png" /></figure><p>Imagine this scenario: It’s a Friday afternoon, a bad database migration script runs on your OpenShift cluster, and years of critical application data drop into a digital void. If your first instinct is to look for an external infrastructure console or brace for a grueling multi-hour download from an offsite repository, it’s time to modernize.</p><p>Red Hat OpenShift handles stateful storage backups seamlessly right from the web console or the oc CLI using the <strong>Container Storage Interface (CSI) Volume Snapshot</strong> architecture.</p><p>If you are running persistent enterprise workloads (like PostgreSQL, MySQL, or Kafka) on modern OpenShift clusters, understanding PVC snapshots isn’t just a neat trick — it’s your primary line of defense for rapid local recovery. Let’s break down how it works, how to set it up, and how to execute a lightning-fast restore.</p><h3><strong>The Core Concept: How CSI Snapshots Work in OpenShift</strong></h3><p>Historically, backing up Kubernetes data meant deploying heavy external agents to copy files out of a volume bit by bit over the network.</p><p>The CSI Snapshotter changed the game. It translates declarative OpenShift custom resources into native API calls for your underlying infrastructure storage engine — whether you are running on cloud-native providers (AWS EBS, GCP Persistent Disk, Azure Disk) or on-premise infrastructure (VMware vSphere, Ceph/Red Hat OpenShift Data Foundation).</p><p>When you request a snapshot, OpenShift instructs the underlying storage controller to instantly capture a point-in-time pointer of that storage block. This process happens almost instantaneously and without eating up your network bandwidth.</p><h3>The Prerequisites</h3><p>Before taking your first snapshot, your OpenShift cluster needs two main components configured by a cluster administrator:</p><ol><li><strong>A CSI-Compliant Storage Driver:</strong> Your active StorageClass must use a CSI-compliant provisioner.</li><li><strong>A </strong><strong>VolumeSnapshotClass:</strong> This acts just like a standard StorageClass, but it defines <em>how</em> and <em>which</em> driver handles the snapshot creation.</li></ol><p>To check if your cluster has a snapshot class available, run:</p><pre>oc get volumesnapshotclass</pre><p>If you see an active driver listed (e.g., openshift-storage.rbd.csi.ceph.com or ebs.csi.aws.com), you are ready to proceed.</p><h3>Step 1: The Base State (Your Live Application)</h3><p>Let’s assume you have a stateful application running in your project namespace writing to a 10GB Persistent Volume Claim named production-data-pvc:</p><pre>apiVersion: v1<br>kind: PersistentVolumeClaim<br>metadata:<br>  name: production-data-pvc<br>  namespace: production-apps<br>spec:<br>  accessModes:<br>    - ReadWriteOnce<br>  resources:<br>    requests:<br>      storage: 10Gi<br>  storageClassName: odf-ceph-rbd # Example CSI Storage Class</pre><h3>Step 2: The Backup (Creating the Volume Snapshot)</h3><p>To take a native backup, you create a VolumeSnapshot object. This configuration maps directly back to your running production PVC.</p><p>Save the following manifest as snapshot.yaml:</p><pre>apiVersion: snapshot.storage.k8s.io/v1<br>kind: VolumeSnapshot<br>metadata:<br>  name: app-data-snapshot-v1<br>  namespace: production-apps<br>spec:<br>  volumeSnapshotClassName: odf-ceph-rbd-snapshotclass # Match your cluster&#39;s class<br>  source:<br>    persistentVolumeClaimName: production-data-pvc</pre><p>Apply the manifest to kick off the underlying storage array backup:</p><pre>oc apply -f snapshot.yaml</pre><h3>Verifying the Backup State</h3><p>Because storage arrays handle snapshotting asynchronously, you must verify when the asset is safely finalized. Monitor its status with the oc tool:</p><p>Bash</p><pre>oc get volumesnapshot app-data-snapshot-v1 -n production-apps</pre><p>Look for the crucial <strong>READYTOUSE: true</strong> column in the terminal output:</p><p>Plaintext</p><pre>NAME                   READYTOUSE   SOURCEPVC             SOURCESNAPSHOTCONTENT   AGE<br>app-data-snapshot-v1   true         production-data-pvc   snapcontent-12345       45s</pre><blockquote><em>💡 </em><strong><em>Enterprise Production Tip:</em></strong><em> While CSI snapshots are block-level crash-consistent, database memory states can be tricky. For critical deployments, temporarily scale your application Deployment/StatefulSet down to </em><em>0 replicas or run an application-level flush/lock command immediately before taking the snapshot to guarantee complete transactional integrity.</em></blockquote><h3>Step 3: The Restore (Resurrecting Data into a New PVC)</h3><p>Now for the recovery phase. If a corruption event occurs, you don’t overwrite the existing volume directly. Instead, you provision a <strong>brand new PVC</strong> and instruct OpenShift to populate it using your snapshot as the data source.</p><p>Save this manifest as restore-pvc.yaml:</p><p>YAML</p><pre>apiVersion: v1<br>kind: PersistentVolumeClaim<br>metadata:<br>  name: recovered-data-pvc<br>  namespace: production-apps<br>spec:<br>  storageClassName: odf-ceph-rbd<br>  dataSource:<br>    name: app-data-snapshot-v1<br>    kind: VolumeSnapshot<br>    apiGroup: snapshot.storage.k8s.io<br>  accessModes:<br>    - ReadWriteOnce<br>  resources:<br>    requests:<br>      storage: 10Gi # Note: This can be larger than the original size for expansion, but never smaller!</pre><p>Apply the restore file:</p><p>Bash</p><pre>oc apply -f restore-pvc.yaml</pre><p>Once the storage controller spins up the underlying disk asset, your status will change to Bound:</p><p>Bash</p><pre>oc get pvc recovered-data-pvc -n production-apps</pre><h3>Pointing Your Application to the Restored Data</h3><p>To complete the recovery loop, update your Deployment, StatefulSet, or DeploymentConfig specification YAML to point its volume claim configuration away from production-data-pvc and over to your newly minted recovered-data-pvc.</p><p>YAML</p><pre>spec:<br>  volumes:<br>    - name: storage-volume<br>      persistentVolumeClaim:<br>        claimName: recovered-data-pvc # Your newly restored volume</pre><p>Apply the updated workload deployment manifest, and your pods will spin back up exactly where they were when the snapshot was captured.</p><h3>Taking It Further: Snapshots vs. OADP</h3><p>While local CSI snapshots are incredibly fast and efficient for rollback scenarios, keep these design limitations in mind:</p><ul><li><strong>Blast Radius:</strong> Snapshots live on the exact same underlying storage back-end as your live data. If the entire underlying storage tier or region suffers a catastrophic hardware failure, your snapshots go down with it.</li><li><strong>The Solution:</strong> For true Disaster Recovery (DR), combine CSI snapshots with <strong>OpenShift API for Data Protection (OADP)</strong>. OADP orchestrates these exact CSI snapshots but allows you to ship the volume backups and resource metadata offsite to secure target object storage (like AWS S3 or MinIO).</li></ul><h3>Wrapping Up</h3><p>Native CSI snapshots transform manual backup routines into automated, declarative infrastructure as code. By integrating these simple VolumeSnapshot manifests into your GitOps pipelines or using an automated CronJob, you can establish robust, enterprise-grade data protection mechanisms directly inside Red Hat OpenShift.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=041455af74df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Protect internal traffic in openshift]]></title>
            <link>https://medium.com/@muhammadadel612/protect-internal-traffic-in-openshift-9b8c88496459?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b8c88496459</guid>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 06:39:45 GMT</pubDate>
            <atom:updated>2026-06-15T06:42:07.975Z</atom:updated>
            <content:encoded><![CDATA[<p>Zero-trust environment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a9BgJKwF_wRpr9mtr60itQ.png" /><figcaption>Internal traffic</figcaption></figure><h3><strong>Securing internal cluster:</strong></h3><p>communication is a critical pillar of a Zero-Trust Kubernetes architecture. In Red Hat OpenShift, while external traffic entering the cluster through Ingress/Routes is typically encrypted, traffic inside the cluster (Pod-to-Pod, Pod-to-Service) often runs over unencrypted HTTP by default.<br>​If an attacker compromises a single container, they could potentially sniff internal network traffic.<br>​Here is a comprehensive guide on how to protect internal traffic in OpenShift using Transport Layer Security (TLS), moving from automated platform features to advanced service meshes.</p><p><strong>​1. Leveraging OpenShift’s Service CA Operator (The Easiest Way)</strong></p><p>​OpenShift includes a built-in Service CA Operator that automatically manages certificates for internal services. If you have an internal microservice that needs to accept TLS traffic, you don’t need to manually generate certificates via OpenSSL or external PKI.</p><p><strong>​How It Works</strong><br>​The Service CA Operator watches for specific annotations on OpenShift Service objects. When it detects the annotation, it automatically creates a signed certificate and private key, injecting them into a designated secret.</p><p><strong>​Implementation Steps</strong></p><ul><li>Annotate your Service:<br>Add the service.beta.openshift.io/serving-cert-secret-name annotation to your service definition.</li></ul><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: secure-backend<br>  namespace: my-app<br>  annotations:<br>    service.beta.openshift.io/serving-cert-secret-name: secure-backend-tls<br>spec:<br>  ports:<br>  - name: https<br>    port: 8443<br>    targetPort: 8443<br>  selector:<br>    app: backend<br></pre><ul><li>Mount the Secret in your Pod:<br>The operator will automatically create a secret named secure-backend-tls. You must then mount this secret into your application deployment so your web server (e.g., Quarkus, Spring Boot, Node.js) can use the tls.crt and tls.key files.</li><li>Consume the Service CA (For Clients):<br>For client Pods to trust this service, they need the cluster’s Service CA root certificate. OpenShift automatically mounts this root CA into every pod at /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt. Configure your client applications to use this file as their trusted truststore.</li></ul><p><strong>2. Ingress-to-Service Re-encryption</strong></p><p>When exposing applications externally via OpenShift Routes, using Edge termination decrypts traffic at the Ingress Controller (Router) and sends it plaintext to the Pod. To protect the internal leg of that journey, you should use a Re-encryption Route.<br>​With Re-encryption:<br>​The client connects to the Router using a public TLS certificate.<br>​The Router terminates the public TLS.<br>​The Router establishes a new TLS connection to the backend Pod using the internal Service CA certificate.</p><pre>apiVersion: route.openshift.io/v1<br>kind: Route<br>metadata:<br>  name: secure-backend-route<br>  namespace: my-app<br>spec:<br>  to:<br>    kind: Service<br>    name: secure-backend<br>  port:<br>    targetPort: https<br>  tls:<br>    termination: reencrypt<br>    destinationCACertificate: |-<br>      -----BEGIN CERTIFICATE-----<br>      ... [Cluster Service CA Certificate] ...<br>      -----END CERTIFICATE-----<br></pre><p><strong>​3. The Ultimate Zero-Trust Solution</strong>: Red Hat OpenShift Service Mesh (Istio)<br>​While the Service CA Operator works great for individual services, managing TLS configurations inside every application runtime code base can become a major operational burden.<br>​For large-scale microservice architectures, Red Hat OpenShift Service Mesh (RHOSM), based on Istio, provides mutual TLS (mTLS) automatically out of the box, requiring zero code changes from developers.</p><p><strong>Why Service Mesh for Internal TLS?</strong></p><ul><li>​<strong>Mutual Authentication: </strong>It enforces TLS both ways—the client verifies the server, and the server verifies the client.</li><li><strong>​Sidecar Proxying</strong>: Envoy proxies are injected into your application pods. The proxies handle the TLS handshake, encryption, and decryption on behalf of your application.</li><li><strong>​Automatic Rotation: </strong>Certs are automatically issued and rotated frequently by the mesh control plane.</li></ul><p><strong>Enforcing Strict mTLS</strong><br>​To ensure that all traffic within a namespace strictly requires TLS (and drops any plaintext connections), you apply a PeerAuthentication policy:</p><pre>apiVersion: security.istio.io/v1beta1<br>kind: PeerAuthentication<br>metadata:<br>  name: default<br>  namespace: my-app<br>spec:<br>  mtls:<br>    mode: STRICT<br></pre><p><strong>4. Network-Level Encryption with IPsec</strong><br>​If your security compliance dictates that traffic must be encrypted not just at the application/layer 7 level, but at the packet/layer 3 level, OpenShift allows you to enable IPsec on the cluster network provider (OVN-Kubernetes).<br>​When IPsec is enabled, all inter-node traffic traveling across the underlying physical infrastructure is automatically encrypted at the network layer.</p><p><strong>​Enabling IPsec</strong><br>​This is typically configured during cluster installation or via a post-install configuration of the Network Operator:</p><pre>apiVersion: operator.openshift.io/v1<br>kind: Network<br>metadata:<br>  name: cluster<br>spec:<br>  defaultNetwork:<br>    type: OVNKubernetes<br>    ovnKubernetesConfig:<br>      ipsecConfig: {} # Enables IPsec encryption between nodes<br></pre><p><strong>By combining Re-encryption Routes for ingress, Service Mesh (mTLS) for microservices, and IPsec for underlying infrastructure, you achieve a hardened, defense-in-depth security posture that easily meets stringent enterprise compliance standards.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b8c88496459" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Guide to Backup and Restore via OpenShift OADP]]></title>
            <link>https://medium.com/@muhammadadel612/here-is-a-comprehensive-publication-ready-medium-style-article-that-walks-through-backing-up-and-55a63cd50f90?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/55a63cd50f90</guid>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 06:55:08 GMT</pubDate>
            <atom:updated>2026-06-13T06:57:30.950Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*3zCRUZJl6jE4RiJyishKIQ.png" /><figcaption>OADP</figcaption></figure><p>​Imagine this: a cluster-wide failure strikes, a database volume gets corrupted, or a developer accidentally nukes an entire production namespace. If your heart didn’t skip a beat just now, you either have an ironclad backup strategy or you haven’t faced a day-zero crisis yet.</p><p><strong>​</strong>In the world of containerized applications, protecting your data can feel like chasing a moving target. Thankfully, Red Hat provides a robust solution built natively for this exact challenge: OpenShift API for Data Protection (OADP). Utilizing Velero under the hood, OADP lets you back up cluster resources (Kubernetes manifests), persistent volumes (PVs), and container images with ease.</p><p><strong>​Here is a step-by-step technical guide to getting OADP up, running, and pulling your apps back from the brink.</strong></p><h3>​The Core Blueprint</h3><p>​Before jumping into the command line, it’s vital to understand what OADP does behind the scenes.</p><p>OADP abstracts your data protection into a dedicated operator. When you trigger a backup, it marshals two primary streams of data:</p><ol><li><strong>​Cluster State:</strong> YAML configurations, configs, secrets, and namespace definitions are packaged and stored in an S3-compatible Object Storage.</li><li><strong>Application State:</strong> Persistent Volumes are copied either using cloud-native storage snapshots, Container Storage Interface (CSI) snapshots, or file-level backup tools like Restic/Kopia.</li></ol><p><strong><em>Step 1: Preparation &amp; Prerequisites</em></strong></p><p>Before installing the operator, you need a designated safe haven for your backups. OADP requires an S3-compatible object storage bucket (e.g., AWS S3, MinIO, or OpenShift Data Foundation/NooBaa).</p><p>​Once your bucket is created, ou must generate a credentials file (credentials-velero) containing your access keys:</p><pre>[default]<br>aws_access_key_id = YOUR_AWS_ACCESS_KEY<br>aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY<br></pre><p>Create a secret in your OpenShift cluster inside a new namespace called openshift-adp:</p><pre>#oc create namespace openshift-adp<br>#oc create secret generic cloud-credentials --from-file=cloud=credentials-velero -n openshift-adp<br></pre><p><strong><em>Step 2: Install the OADP Operator</em></strong></p><ol><li>​Log into your OpenShift Web Console as a cluster administrator.</li><li>​Navigate to Operators &gt; OperatorHub.</li><li>Search for OADP Operator and click Install.</li><li>​Keep the default options (installed into the openshift-adp namespace) and complete the installation.</li></ol><p><strong><em>​Step 3: Deploy the Data Protection Application (DPA)</em></strong></p><p>The OADP Operator acts as a controller, but it won’t do anything until you instantiate a DataProtectionApplication (DPA) Custom Resource. This file tells Velero where your bucket lives and what features to enable.</p><p>​Create a file named oadp-dpa.yaml:</p><pre>apiVersion: oadp.openshift.io/v1alpha1<br>kind: DataProtectionApplication<br>metadata:<br>  name: oadp-dpa<br>  namespace: openshift-adp<br>spec:<br>  configuration:<br>    velero:<br>      defaultPlugins:<br>        - openshift<br>        - aws<br>    nodeAgent:<br>      enable: true<br>      uploaderType: kopia<br>  backupLocations:<br>    - velero:<br>        config:<br>          profile: &quot;default&quot;<br>          region: us-east-1<br>        provider: aws<br>        objectStorage:<br>          bucket: my-openshift-backup-bucket<br>          prefix: velero<br>        credential:<br>          name: cloud-credentials<br>          key: cloud<br></pre><p>Apply the configuration:</p><pre>#oc apply -f oadp-dpa.yaml<br></pre><p>Verify the installation by running oc get pods -n openshift-adp. You should see the Velero deployment and node-agent pods transitioning to a Running state.</p><p><strong><em>Step 4: Executing an On-Demand Backup</em></strong><em><br></em>Let’s test this out on a stateful application. Suppose you have a critical production database running in the namespace prod-database.<br>​To back up the entire namespace, including its configuration and data volumes, create a backup.yaml file:</p><pre>apiVersion: velero.io/v1<br>kind: Backup<br>metadata:<br>  name: prod-db-backup-01<br>  namespace: openshift-adp<br>spec:<br>  includedNamespaces:<br>  - prod-database<br>  storageLocation: default<br>  ttl: 720h0m0s # Keeps backup for 30 days<br></pre><p>Trigger the backup:</p><pre>#oc apply -f backup.yaml<br></pre><p>You can monitor its progress using the OpenShift CLI:</p><pre>#oc get backup -n openshift-adp prod-db-backup-01 -o jsonpath=’{.status.phase}&#39;<br></pre><p><strong><em>Step 5: The Ultimate Test — Restoring Your Data</em></strong></p><p>​Simulate a catastrophic accident. Delete the prod-database namespace:</p><pre>#oc delete namespace prod-database<br></pre><p>With your live environment gone, you can summon OADP to restore the day. Create a restore.yaml file targeting your successful backup:</p><pre>apiVersion: velero.io/v1<br>kind: Restore<br>metadata:<br>  name: prod-db-restore-01<br>  namespace: openshift-adp<br>spec:<br>  backupName: prod-db-backup-01<br>  includedNamespaces:<br>  - prod-database<br></pre><p>Apply the restore configuration:</p><pre>#oc apply -f restore.yaml<br></pre><p>Watch the magic happen as OADP spins up the namespace, recreates the secrets, spins up the deployment configurations, and hooks back into the recovered data volumes:</p><pre>#oc get restore -n openshift-adp prod-db-restore-01<br></pre><p>Once the status reports Completed, verify your application. You will find your environment perfectly resurrected exactly as it was when the backup snapshot was taken.</p><p>​Best Practices for Productio​n :</p><ul><li><strong>Automate with Schedules: </strong>Never rely purely on manual backups. Use the Schedule API object within OADP to execute cron-like backups (e.g., daily at midnight).</li><li>​<strong>Leverage Hooks: </strong>If you are running highly sensitive transactional databases, utilize OADP backup hooks to freeze or flush your database to disk right before the snapshot is taken, preventing data corruption.</li><li>​<strong>Regularly Audit Restores:</strong> A backup is only as good as its ability to restore. Set up a staging cluster or temporary namespace to routinely test your recovery manifests.</li></ul><p>​With OADP deployed, your OpenShift cluster transitions from a potential single point of failure into a resilient, highly recoverable enterprise ecosystem.</p><p>​Happy backing up!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55a63cd50f90" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenShift Monitoring: A Practical Guide to Observability in Modern Kubernetes Platforms]]></title>
            <link>https://medium.com/@muhammadadel612/openshift-monitoring-a-practical-guide-to-observability-in-modern-kubernetes-platforms-58c0453c9f4d?source=rss-9f530a2d2302------2</link>
            <guid isPermaLink="false">https://medium.com/p/58c0453c9f4d</guid>
            <category><![CDATA[openshift-monitoring]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Muhammad Adel]]></dc:creator>
            <pubDate>Tue, 10 Mar 2026 22:39:43 GMT</pubDate>
            <atom:updated>2026-03-10T22:39:43.224Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bibmIkRS6E4Er_LPkmzxrA.png" /></figure><p>Modern cloud-native platforms require <strong>deep visibility</strong> into applications, infrastructure, and cluster components. Monitoring is essential for detecting failures, maintaining performance, and ensuring reliability.</p><p>In <strong>Red Hat OpenShift</strong>, monitoring is built directly into the platform using a powerful stack centered around <strong>Prometheus</strong>, <strong>Grafana</strong>, and <strong>Alertmanager</strong>. This built-in monitoring system provides operators and developers with the tools needed to observe workloads running on <strong>Kubernetes</strong>.</p><p>In this article, we explore how OpenShift monitoring works internally, its architecture, and how you can use it effectively.</p><h3>Why Monitoring Matters in OpenShift</h3><p>Monitoring helps answer critical operational questions:</p><ul><li>Is the cluster healthy?</li><li>Are applications performing correctly?</li><li>Are resources being exhausted?</li><li>Did a new deployment introduce issues?</li></ul><p>Without proper monitoring, diagnosing issues in distributed environments becomes extremely difficult.</p><p>OpenShift addresses this challenge by integrating <strong>metrics collection, visualization, and alerting</strong> directly into the platform.</p><h3>OpenShift Monitoring Architecture</h3><p>The OpenShift monitoring stack is composed of several components working together.</p><h3>Core Components</h3><ol><li><strong>Prometheus</strong> — Collects and stores metrics</li><li><strong>Grafana</strong> — Visualizes metrics in dashboards</li><li><strong>Alertmanager</strong> — Manages alerts and notifications</li><li><strong>Node Exporter</strong> — Collects node-level metrics</li><li><strong>kube-state-metrics</strong> — Exposes Kubernetes object metrics</li></ol><h3>Simplified Architecture Flow</h3><pre>Applications / Nodes / Kubernetes Components<br>                │<br>                │  (metrics)<br>                ▼<br>          Prometheus Server<br>                │<br>        ┌───────┴────────┐<br>        ▼                ▼<br>   Alertmanager       Grafana<br>   (Alerting)        (Dashboards)</pre><p>Metrics flow from cluster components into Prometheus, which stores them in a time-series database. Grafana visualizes the data, while Alertmanager handles alert notifications.</p><h3>Two Monitoring Stacks in OpenShift</h3><p>OpenShift actually provides <strong>two separate monitoring stacks</strong>.</p><h3>1. Platform Monitoring</h3><p>This monitors <strong>cluster components</strong> such as:</p><ul><li>API Server</li><li>Scheduler</li><li>Controller Manager</li><li>etcd</li><li>Nodes</li></ul><p>It is managed automatically by OpenShift administrators and ensures the cluster itself remains healthy.</p><h3>2. User Workload Monitoring</h3><p>This allows developers to monitor <strong>their own applications</strong>.</p><p>It is typically enabled through the following configuration:</p><pre>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: cluster-monitoring-config<br>  namespace: openshift-monitoring<br>data:<br>  config.yaml: |<br>    enableUserWorkload: true</pre><p>Once enabled, OpenShift creates a dedicated monitoring stack in the namespace:</p><pre>openshift-user-workload-monitoring</pre><p>This includes:</p><ul><li>Prometheus for user workloads</li><li>Thanos for long-term storage</li><li>Alertmanager for application alerts</li></ul><h3>How Metrics Are Collected</h3><p>Metrics are usually exposed through HTTP endpoints using the <strong>Prometheus metrics format</strong>.</p><p>Example application metric endpoint:</p><pre>http://my-app:8080/metrics</pre><p>Prometheus collects these metrics using <strong>ServiceMonitor</strong> resources.</p><h3>Example ServiceMonitor</h3><pre>apiVersion: monitoring.coreos.com/v1<br>kind: ServiceMonitor<br>metadata:<br>  name: my-app-monitor<br>  namespace: monitoring<br>spec:<br>  selector:<br>    matchLabels:<br>      app: my-app<br>  endpoints:<br>  - port: metrics<br>    interval: 30s</pre><p>This configuration instructs Prometheus to scrape metrics from services labeled app: my-app.</p><h3>Built-in OpenShift Dashboards</h3><p>One of the advantages of OpenShift is that it already provides <strong>preconfigured dashboards</strong>.</p><p>Through the OpenShift Web Console you can view:</p><ul><li>Cluster CPU usage</li><li>Memory consumption</li><li>Network traffic</li><li>Pod health</li><li>Node resource utilization</li></ul><p>These dashboards help operators quickly understand the cluster state without building custom visualizations.</p><h3>Alerting in OpenShift</h3><p>Alerting ensures that issues are detected early before impacting users.</p><p>Alerts are defined using <strong>PrometheusRule</strong> objects.</p><h3>Example Alert Rule</h3><pre>apiVersion: monitoring.coreos.com/v1<br>kind: PrometheusRule<br>metadata:<br>  name: high-cpu-alert<br>  namespace: monitoring<br>spec:<br>  groups:<br>  - name: example<br>    rules:<br>    - alert: HighCPUUsage<br>      expr: instance:node_cpu_utilisation:rate5m &gt; 0.9<br>      for: 5m<br>      labels:<br>        severity: warning<br>      annotations:<br>        description: CPU usage is above 90%</pre><p>When this condition becomes true, the alert is sent to Alertmanager, which can notify teams via:</p><ul><li>Email</li><li>Slack</li><li>PagerDuty</li><li>Webhooks</li></ul><h3>Best Practices for OpenShift Monitoring</h3><p>To get the most value from monitoring in OpenShift:</p><h3>1. Expose Application Metrics</h3><p>Ensure applications expose meaningful metrics such as:</p><ul><li>request latency</li><li>error rates</li><li>throughput</li></ul><h3>2. Use Labels Effectively</h3><p>Labels allow better filtering and aggregation in Prometheus queries.</p><h3>3. Create Custom Dashboards</h3><p>While built-in dashboards exist, application-specific dashboards improve visibility.</p><h3>4. Define Meaningful Alerts</h3><p>Avoid alert fatigue by ensuring alerts represent real operational problems.</p><h3>5. Monitor SLOs</h3><p>Track Service Level Objectives such as uptime and response times.</p><h3>Conclusion</h3><p>Monitoring is a critical pillar of operating reliable cloud-native systems. OpenShift simplifies this challenge by integrating a powerful observability stack based on <strong>Prometheus</strong>, <strong>Grafana</strong>, and <strong>Alertmanager</strong>.</p><p>With built-in dashboards, automated metrics collection, and powerful alerting capabilities, OpenShift enables teams to quickly detect issues, understand system behavior, and maintain high-availability applications at scale.</p><p>A well-configured monitoring strategy allows organizations to move from <strong>reactive troubleshooting</strong> to <strong>proactive operations</strong>, which is essential in modern Kubernetes environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58c0453c9f4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>