<?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: Mh Asif Kamal</title>
    <description>The latest articles on DEV Community by Mh Asif Kamal (@mhasif0786).</description>
    <link>https://dev.to/mhasif0786</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%2F772433%2Fddd05310-8d05-4ae4-adfe-125fe77dcdb8.jpeg</url>
      <title>DEV Community: Mh Asif Kamal</title>
      <link>https://dev.to/mhasif0786</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mhasif0786"/>
    <language>en</language>
    <item>
      <title>Building a Kubernetes GitOps Lab with Argo CD: Installation, DNS Troubleshooting and Nginx Deployment</title>
      <dc:creator>Mh Asif Kamal</dc:creator>
      <pubDate>Sat, 31 Oct 2026 06:27:32 +0000</pubDate>
      <link>https://dev.to/mhasif0786/building-a-kubernetes-gitops-lab-with-argo-cd-installation-dns-troubleshooting-and-nginx-2b51</link>
      <guid>https://dev.to/mhasif0786/building-a-kubernetes-gitops-lab-with-argo-cd-installation-dns-troubleshooting-and-nginx-2b51</guid>
      <description>&lt;h1&gt;
  
  
  Installing and Configuring Argo CD on Kubernetes | GitOps Lab
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Overview
&lt;/h2&gt;

&lt;p&gt;In this lab, I installed Argo CD on a two-node Kubernetes cluster using the official Argo CD installation manifest and configured it to deploy an Nginx application from a GitHub repository.&lt;/p&gt;

&lt;p&gt;Argo CD is a declarative GitOps continuous delivery tool for Kubernetes. It continuously monitors the desired application state stored in a Git repository and compares it with the actual state running inside the Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;When changes are committed to Git, Argo CD can automatically synchronize those changes with the Kubernetes cluster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab environment
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Configuration&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kubernetes cluster&lt;/td&gt;
&lt;td&gt;kubeadm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control-plane node&lt;/td&gt;
&lt;td&gt;&lt;code&gt;k8s&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control-plane IP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.64.4&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worker node&lt;/td&gt;
&lt;td&gt;&lt;code&gt;workernode2&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worker IP&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.64.5&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Operating system&lt;/td&gt;
&lt;td&gt;Ubuntu 26.10 ARM64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Container runtime&lt;/td&gt;
&lt;td&gt;containerd&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CNI&lt;/td&gt;
&lt;td&gt;Calico&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argo CD namespace&lt;/td&gt;
&lt;td&gt;&lt;code&gt;argocd&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Installation method&lt;/td&gt;
&lt;td&gt;Official stable manifest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Git repository&lt;/td&gt;
&lt;td&gt;GitHub&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Application&lt;/td&gt;
&lt;td&gt;Nginx&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Application namespace&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nginx-demo&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  2. Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before installing Argo CD, ensure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes cluster is initialized and operational.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl&lt;/code&gt; is installed and configured.&lt;/li&gt;
&lt;li&gt;All nodes are in Ready state.&lt;/li&gt;
&lt;li&gt;CoreDNS is installed and running.&lt;/li&gt;
&lt;li&gt;Cluster networking is functional.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check the cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get nodes &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check system pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Create the Argo CD namespace
&lt;/h2&gt;

&lt;p&gt;We created a dedicated namespace to isolate Argo CD components from application workloads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl create namespace argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get namespaces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why a separate namespace?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keeps Argo CD components logically isolated.&lt;/li&gt;
&lt;li&gt;Makes resource management easier.&lt;/li&gt;
&lt;li&gt;Allows namespace-level monitoring and troubleshooting.&lt;/li&gt;
&lt;li&gt;Provides a dedicated location for Argo CD secrets and configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Install Argo CD
&lt;/h2&gt;

&lt;p&gt;We used the official Argo CD installation manifest from the stable release channel.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-n&lt;/span&gt; argocd &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-f&lt;/span&gt; https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This manifest installs the Argo CD components and their required Kubernetes resources, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deployments&lt;/li&gt;
&lt;li&gt;Services&lt;/li&gt;
&lt;li&gt;ConfigMaps&lt;/li&gt;
&lt;li&gt;Secrets&lt;/li&gt;
&lt;li&gt;ServiceAccounts&lt;/li&gt;
&lt;li&gt;RBAC resources&lt;/li&gt;
&lt;li&gt;Custom Resource Definitions (CRDs)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The standard installation includes the components required for the Argo CD UI, API, repository access, and application reconciliation.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Verify the installation
&lt;/h2&gt;

&lt;p&gt;Check all Argo CD pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; argocd &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check deployments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get deployments &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get services &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check all resources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get all &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our lab, all seven Argo CD pods reached the Running state with containers Ready.&lt;/p&gt;

&lt;h3&gt;
  
  
  Important Argo CD components
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;argocd-server&lt;/td&gt;
&lt;td&gt;API server and web UI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;argocd-repo-server&lt;/td&gt;
&lt;td&gt;Clones Git repositories and generates application manifests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;argocd-application-controller&lt;/td&gt;
&lt;td&gt;Monitors applications and reconciles desired state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;argocd-dex-server&lt;/td&gt;
&lt;td&gt;Identity integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;argocd-redis&lt;/td&gt;
&lt;td&gt;Caching&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;argocd-applicationset-controller&lt;/td&gt;
&lt;td&gt;Generates and manages applications from ApplicationSet resources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;argocd-notifications-controller&lt;/td&gt;
&lt;td&gt;Application event notifications&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2F91a5142a-519b-4932-9118-b3f96617d1ce" class="article-body-image-wrapper"&gt;&lt;img width="760" height="422" alt="image" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2F91a5142a-519b-4932-9118-b3f96617d1ce"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Access the Argo CD web UI
&lt;/h2&gt;

&lt;p&gt;By default, Argo CD's server is not exposed externally through a LoadBalancer or Ingress.&lt;/p&gt;

&lt;p&gt;For our local Kubernetes lab, we used &lt;code&gt;kubectl port-forward&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl port-forward svc/argocd-server &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-n&lt;/span&gt; argocd 8080:443 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--address&lt;/span&gt; 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2Fa60d7ba9-8668-474d-b62b-9f2e23a1b6cc" class="article-body-image-wrapper"&gt;&lt;img width="1144" height="690" alt="image" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2Fa60d7ba9-8668-474d-b62b-9f2e23a1b6cc"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;svc/argocd-server&lt;/code&gt;: Targets the Argo CD server Service.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-n argocd&lt;/code&gt;: Selects the Argo CD namespace.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;8080:443&lt;/code&gt;: Maps port 8080 on the VM to HTTPS port 443 on the Service.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--address 0.0.0.0&lt;/code&gt;: Allows connections to the forwarded port through the VM's network interfaces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep this terminal running while accessing the UI.&lt;/p&gt;

&lt;p&gt;Open the following URL from the Mac:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://192.168.64.4:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The default installation uses a self-signed TLS certificate, so the browser may display a certificate warning. This is expected for the initial lab setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security note:&lt;/strong&gt; Binding to &lt;code&gt;0.0.0.0&lt;/code&gt; exposes the forwarded port on all VM interfaces. Use this only in a controlled lab network. For a more restricted setup, bind to &lt;code&gt;127.0.0.1&lt;/code&gt; and access through an appropriate tunnel.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Retrieve the initial admin password
&lt;/h2&gt;

&lt;p&gt;Argo CD generates an initial password for its &lt;code&gt;admin&lt;/code&gt; account and stores it in a Kubernetes Secret.&lt;/p&gt;

&lt;p&gt;Retrieve it using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl &lt;span class="nt"&gt;-n&lt;/span&gt; argocd get secret argocd-initial-admin-secret &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;jsonpath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"{.data.password}"&lt;/span&gt; | &lt;span class="nb"&gt;base64&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Login credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Username: admin
Password: Output of the previous command
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enter these credentials in the Argo CD web UI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security recommendation:&lt;/strong&gt; Change the initial admin password after the first login. Once the password has been changed, delete the initial password Secret:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl delete secret argocd-initial-admin-secret &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8. Connect Argo CD to a Git repository
&lt;/h2&gt;

&lt;p&gt;After installation, the next step is to connect Argo CD to a Git repository containing Kubernetes manifests.&lt;/p&gt;

&lt;p&gt;For our lab, we used:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub repository:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mhasif0786/mhasifkamal-infra.git" rel="noopener noreferrer"&gt;https://github.com/mhasif0786/mhasifkamal-infra.git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository contains the desired Kubernetes configuration.&lt;/p&gt;

&lt;p&gt;Example repository structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mhasifkamal-infra/
│
├── apps/
│   └── nginx-demo/
│       ├── deployment.yaml
│       └── service.yaml
│
└── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application directory contains the Kubernetes manifests that Argo CD monitors.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Create the Nginx Kubernetes manifests
&lt;/h2&gt;

&lt;h3&gt;
  
  
  9.1 Deployment manifest
&lt;/h3&gt;

&lt;p&gt;File: &lt;code&gt;apps/nginx-demo/deployment.yaml&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  9.2 Service manifest
&lt;/h3&gt;

&lt;p&gt;File: &lt;code&gt;apps/nginx-demo/service.yaml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The Deployment maintains two Nginx pod replicas.&lt;/p&gt;

&lt;p&gt;The Service provides a stable internal endpoint to access the Nginx pods.&lt;/p&gt;

&lt;p&gt;Commit and push the manifests to GitHub before configuring the Argo CD application.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Create an Argo CD Application
&lt;/h2&gt;

&lt;p&gt;We created an application named &lt;code&gt;nginx-demo&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The application configuration was:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setting&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Application name&lt;/td&gt;
&lt;td&gt;nginx-demo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project&lt;/td&gt;
&lt;td&gt;default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Repository URL&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://github.com/mhasif0786/mhasifkamal-infra.git&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Target revision&lt;/td&gt;
&lt;td&gt;HEAD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Path&lt;/td&gt;
&lt;td&gt;&lt;code&gt;apps/nginx-demo&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Destination cluster&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://kubernetes.default.svc&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Destination namespace&lt;/td&gt;
&lt;td&gt;nginx-demo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sync policy&lt;/td&gt;
&lt;td&gt;Automatic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auto-create namespace&lt;/td&gt;
&lt;td&gt;Enabled&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Understanding the configuration
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Repository URL:&lt;/strong&gt; The Git repository containing the desired Kubernetes state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Target revision:&lt;/strong&gt; &lt;code&gt;HEAD&lt;/code&gt; tells Argo CD to track the repository's current HEAD revision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Path:&lt;/strong&gt; Identifies the directory containing Kubernetes manifests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Destination cluster:&lt;/strong&gt; &lt;code&gt;https://kubernetes.default.svc&lt;/code&gt; refers to the Kubernetes cluster where Argo CD is running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Destination namespace:&lt;/strong&gt; The namespace where the application resources should be deployed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatic synchronization:&lt;/strong&gt; Argo CD can automatically reconcile changes in Git with the cluster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auto-create namespace:&lt;/strong&gt; Allows Argo CD to create the destination namespace if it does not already exist.&lt;/p&gt;

&lt;p&gt;We used the existing &lt;code&gt;default&lt;/code&gt; AppProject.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Troubleshooting: Argo CD could not access GitHub
&lt;/h2&gt;

&lt;p&gt;During application creation, we encountered:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;InvalidSpecError: repository not accessible

unable to ls-remote HEAD

Get "https://github.com/.../info/refs?service=git-upload-pack":

dial tcp: lookup github.com on 10.96.0.10:53:
server misbehaving
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This indicated a DNS resolution failure rather than a Git authentication problem.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2F773856d8-11af-46d3-9571-d7c8725118e0" class="article-body-image-wrapper"&gt;&lt;img width="760" height="432" alt="image" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2F773856d8-11af-46d3-9571-d7c8725118e0"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  11.1 Check CoreDNS pods
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Both CoreDNS pods were Running.&lt;/p&gt;

&lt;p&gt;However, Running status alone does not guarantee successful DNS resolution.&lt;/p&gt;
&lt;h3&gt;
  
  
  11.2 Inspect the CoreDNS configuration
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get configmap coredns &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system &lt;span class="nt"&gt;-o&lt;/span&gt; yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We found:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;forward . /etc/resolv.conf {
    max_concurrent 1000
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This forwards external DNS queries to the upstream resolvers listed in &lt;code&gt;/etc/resolv.conf&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  11.3 Inspect the node DNS configuration
&lt;/h3&gt;



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

&lt;/div&gt;



&lt;p&gt;The node had these upstream DNS servers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;192.168.64.1
fe80::8047:15ff:feae:f164%2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CoreDNS logs showed timeouts when forwarding queries to the IPv4 resolver and an error when using the IPv6 link-local resolver.&lt;/p&gt;

&lt;h3&gt;
  
  
  11.4 Compare DNS resolution from the host and pod
&lt;/h3&gt;

&lt;p&gt;From the Kubernetes node:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup github.com 192.168.64.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This succeeded.&lt;/p&gt;

&lt;p&gt;We then created a temporary diagnostic pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl run dns-test &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;busybox:1.36 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--restart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Never &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--command&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the pod, we checked:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/resolv.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pod used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nameserver 10.96.0.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Internal DNS resolution worked:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup kubernetes.default.svc.cluster.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But the direct query to the gateway DNS server failed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup github.com 192.168.64.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We tested alternative upstream resolvers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup github.com 1.1.1.1
nslookup github.com 8.8.8.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both succeeded from the pod.&lt;/p&gt;

&lt;h3&gt;
  
  
  Root cause
&lt;/h3&gt;

&lt;p&gt;The upstream resolvers inherited by CoreDNS were not usable from the CoreDNS pod network for external DNS queries.&lt;/p&gt;

&lt;p&gt;The host could resolve external domains, but the CoreDNS pods could not successfully use the same upstream resolvers.&lt;/p&gt;

&lt;h3&gt;
  
  
  11.5 Correct the CoreDNS forwarding configuration
&lt;/h3&gt;

&lt;p&gt;We updated the CoreDNS ConfigMap.&lt;/p&gt;

&lt;p&gt;Previous configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;forward . /etc/resolv.conf {
    max_concurrent 1000
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Updated configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;forward . 1.1.1.1 8.8.8.8 {
    max_concurrent 1000
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why did we change it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The original configuration dynamically reads upstream DNS servers from &lt;code&gt;/etc/resolv.conf&lt;/code&gt;. However, the inherited resolver configuration was not working from the CoreDNS pod network.&lt;/p&gt;

&lt;p&gt;We verified that &lt;code&gt;1.1.1.1&lt;/code&gt; and &lt;code&gt;8.8.8.8&lt;/code&gt; were reachable and returned valid DNS responses from a Kubernetes diagnostic pod.&lt;/p&gt;

&lt;p&gt;We therefore configured CoreDNS to use these verified upstream resolvers directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  11.6 Restart CoreDNS
&lt;/h3&gt;

&lt;p&gt;After updating the ConfigMap, we restarted the CoreDNS deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl rollout restart deployment/coredns &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wait for the rollout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl rollout status deployment/coredns &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system &lt;span class="nt"&gt;-l&lt;/span&gt; k8s-app&lt;span class="o"&gt;=&lt;/span&gt;kube-dns &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  11.7 Validate DNS resolution
&lt;/h3&gt;

&lt;p&gt;We used a fresh diagnostic pod to validate external and internal DNS resolution.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl run dns-test &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;busybox:1.36 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--restart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Never &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--command&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the pod:&lt;/p&gt;

&lt;p&gt;External DNS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup github.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Internal Kubernetes DNS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nslookup kubernetes.default.svc.cluster.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both internal and external DNS resolution should work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resolution
&lt;/h3&gt;

&lt;p&gt;The CoreDNS forwarding configuration was corrected to use reachable upstream DNS servers rather than the inherited resolver configuration.&lt;/p&gt;

&lt;p&gt;The DNS configuration correction was applied, and CoreDNS was restarted.&lt;/p&gt;

&lt;p&gt;Following this correction, Argo CD successfully accessed the GitHub repository and synchronized the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. Verify Argo CD repository connectivity and application status
&lt;/h2&gt;

&lt;p&gt;After correcting DNS, the &lt;code&gt;nginx-demo&lt;/code&gt; application successfully synchronized.&lt;/p&gt;

&lt;p&gt;We verified the application status in the Argo CD UI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Argo CD dashboard result
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Observed status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Application&lt;/td&gt;
&lt;td&gt;nginx-demo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project&lt;/td&gt;
&lt;td&gt;default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sync status&lt;/td&gt;
&lt;td&gt;Synced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Health status&lt;/td&gt;
&lt;td&gt;Healthy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Operation status&lt;/td&gt;
&lt;td&gt;Sync OK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Repository&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://github.com/mhasif0786/mhasifkamal-infra.git&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Target revision&lt;/td&gt;
&lt;td&gt;HEAD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manifest path&lt;/td&gt;
&lt;td&gt;&lt;code&gt;apps/nginx-demo&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Destination&lt;/td&gt;
&lt;td&gt;in-cluster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Namespace&lt;/td&gt;
&lt;td&gt;nginx-demo&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The dashboard showed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Synced: 1&lt;/li&gt;
&lt;li&gt;Healthy: 1&lt;/li&gt;
&lt;li&gt;Sync OK: 1&lt;/li&gt;
&lt;li&gt;OutOfSync: 0&lt;/li&gt;
&lt;li&gt;Degraded: 0&lt;/li&gt;
&lt;li&gt;Sync errors: 0&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What this confirms
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Argo CD successfully accessed the Git repository.&lt;/li&gt;
&lt;li&gt;Repository manifest retrieval and application processing succeeded.&lt;/li&gt;
&lt;li&gt;The application synchronization operation completed successfully.&lt;/li&gt;
&lt;li&gt;Argo CD reports the application as Healthy and Synced.&lt;/li&gt;
&lt;li&gt;The previous external DNS resolution issue no longer prevents this GitOps workflow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2F71129e90-6e6e-44ae-b36a-bbda70c71112" class="article-body-image-wrapper"&gt;&lt;img width="2032" height="1086" alt="image" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2F71129e90-6e6e-44ae-b36a-bbda70c71112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2Fad7c77f8-96ce-4c58-9586-c850cfba2c6f" class="article-body-image-wrapper"&gt;&lt;img width="2012" height="444" alt="image" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2Fad7c77f8-96ce-4c58-9586-c850cfba2c6f"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Useful commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get applications &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl describe application nginx-demo &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If repository connectivity problems occur again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs deployment/argocd-repo-server &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  13. Verify the Nginx application in Kubernetes
&lt;/h2&gt;

&lt;p&gt;After successful synchronization, we verified the actual Kubernetes resources from the control-plane node.&lt;/p&gt;

&lt;h3&gt;
  
  
  13.1 Check all application resources
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get all &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Actual output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                         READY   STATUS    RESTARTS   AGE   IP                NODE
pod/nginx-68d7965994-8xdrh   1/1     Running   0          19m   192.168.216.82   workernode2
pod/nginx-68d7965994-j5xf5   1/1     Running   0          19m   192.168.216.83   workernode2

NAME            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)
service/nginx   ClusterIP   10.110.116.36   &amp;lt;none&amp;gt;        80/TCP

NAME                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx   2/2     2            2           19m

NAME                               DESIRED   CURRENT   READY
replicaset.apps/nginx-68d7965994   2         2         2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  13.2 Deployment verification
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get deployment nginx &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Observed state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME    READY   UP-TO-DATE   AVAILABLE
nginx   2/2     2            2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Deployment successfully maintains two replicas.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Desired replicas: 2&lt;/li&gt;
&lt;li&gt;Current replicas: 2&lt;/li&gt;
&lt;li&gt;Ready replicas: 2&lt;/li&gt;
&lt;li&gt;Available replicas: 2&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  13.3 Pod verification
&lt;/h3&gt;

&lt;p&gt;Observed pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                     READY   STATUS    RESTARTS   AGE   IP                NODE
nginx-68d7965994-8xdrh   1/1     Running   0          19m   192.168.216.82   workernode2
nginx-68d7965994-j5xf5   1/1     Running   0          19m   192.168.216.83   workernode2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both Nginx pods are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running and Ready (&lt;code&gt;1/1&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Running without container restarts.&lt;/li&gt;
&lt;li&gt;Assigned unique Pod IP addresses.&lt;/li&gt;
&lt;li&gt;Scheduled on the &lt;code&gt;workernode2&lt;/code&gt; worker node.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  13.4 Service verification
&lt;/h3&gt;

&lt;p&gt;Observed Service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)
nginx   ClusterIP   10.110.116.36   &amp;lt;none&amp;gt;        80/TCP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Service configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service name: &lt;code&gt;nginx&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type: &lt;code&gt;ClusterIP&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Cluster IP: &lt;code&gt;10.110.116.36&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Service port: &lt;code&gt;80&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Selector: &lt;code&gt;app=nginx&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Service provides a stable internal endpoint for accessing the Nginx pods.&lt;/p&gt;

&lt;h3&gt;
  
  
  13.5 ReplicaSet verification
&lt;/h3&gt;

&lt;p&gt;Observed ReplicaSet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                     DESIRED   CURRENT   READY
nginx-68d7965994          2         2         2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The ReplicaSet is responsible for maintaining the desired number of Nginx pod replicas.&lt;/p&gt;

&lt;h3&gt;
  
  
  13.6 Understanding the request flow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 Client / Application
                         |
                         |
                         v
                Nginx ClusterIP Service
                  10.110.116.36:80
                         |
                 Service Selector
                    app=nginx
                         |
                 +-------+-------+
                 |               |
                 v               v
           Nginx Pod 1      Nginx Pod 2
           192.168.216.82   192.168.216.83
                 |               |
                 +-------+-------+
                         |
                     workernode2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Kubernetes Service selects pods using the label &lt;code&gt;app=nginx&lt;/code&gt; and makes them available through a stable ClusterIP endpoint.&lt;/p&gt;

&lt;h2&gt;
  
  
  14. Additional Kubernetes verification commands
&lt;/h2&gt;

&lt;p&gt;Check the Deployment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get deployment nginx &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check pods and their node placement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the Service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get svc nginx &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check Service endpoints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get endpoints nginx &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check EndpointSlices:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get endpointslices &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check rollout status:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl rollout status deployment/nginx &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  15. Understanding the GitOps workflow
&lt;/h2&gt;

&lt;p&gt;The complete workflow in this lab:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Developer
    |
    | Changes Kubernetes YAML
    v
GitHub Repository
    |
    | New commit
    v
Argo CD Repo Server
    |
    | Fetches Git repository
    | Reads Kubernetes manifests
    v
Argo CD Application Controller
    |
    | Compares desired state with actual state
    | Detects differences
    v
Kubernetes API Server
    |
    | Applies desired resources
    v
nginx-demo Namespace
    |
    +---- Nginx Deployment
    |
    +---- Nginx ReplicaSet
    |
    +---- Nginx Pods (2 replicas)
    |
    +---- Nginx ClusterIP Service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Desired state vs actual state
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Desired state:&lt;/strong&gt; The configuration stored in Git.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Actual state:&lt;/strong&gt; The resources currently running in Kubernetes.&lt;/p&gt;

&lt;p&gt;Argo CD continuously compares these two states and reports whether the application is Synced or OutOfSync.&lt;/p&gt;

&lt;p&gt;When automated synchronization is configured, Argo CD can apply changes from Git to bring the cluster back toward the desired state.&lt;/p&gt;

&lt;h2&gt;
  
  
  16. Current Lab Status
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kubernetes cluster&lt;/td&gt;
&lt;td&gt;Operational&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argo CD installation&lt;/td&gt;
&lt;td&gt;Successful&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argo CD UI&lt;/td&gt;
&lt;td&gt;Accessible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub repository connection&lt;/td&gt;
&lt;td&gt;Successful&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CoreDNS external forwarding correction&lt;/td&gt;
&lt;td&gt;Applied&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argo CD application sync&lt;/td&gt;
&lt;td&gt;Synced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Application health&lt;/td&gt;
&lt;td&gt;Healthy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nginx Deployment&lt;/td&gt;
&lt;td&gt;2/2 Available&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nginx pods&lt;/td&gt;
&lt;td&gt;2/2 Running&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nginx Service&lt;/td&gt;
&lt;td&gt;ClusterIP created&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nginx ReplicaSet&lt;/td&gt;
&lt;td&gt;2/2 Ready&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; Successfully deployed a two-replica Nginx application using Argo CD and a GitHub-hosted Kubernetes manifest repository. Verified the Deployment, ReplicaSet, pods, and Service directly through Kubernetes.&lt;/p&gt;

&lt;h2&gt;
  
  
  17. Next Steps and Experiments
&lt;/h2&gt;

&lt;p&gt;The next experiments will focus on understanding GitOps reconciliation and Kubernetes production behavior.&lt;/p&gt;

&lt;h3&gt;
  
  
  17.1 Git-driven scaling
&lt;/h3&gt;

&lt;p&gt;Change the replica count in Git from two to three:&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;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commit and push:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Increase nginx replicas to 3"&lt;/span&gt;
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Observe Argo CD detecting the Git change and synchronizing the updated desired state.&lt;/p&gt;

&lt;p&gt;Verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get deployment nginx &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo

kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected deployment state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nginx   3/3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  17.2 Drift detection
&lt;/h3&gt;

&lt;p&gt;Manually change the live Kubernetes state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl scale deployment nginx &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--replicas&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Git still declares three replicas, observe how Argo CD detects the difference.&lt;/p&gt;

&lt;p&gt;This experiment helps distinguish desired state from actual state.&lt;/p&gt;

&lt;h3&gt;
  
  
  17.3 Self-healing
&lt;/h3&gt;

&lt;p&gt;Enable and test automated self-healing through Argo CD.&lt;/p&gt;

&lt;p&gt;Observe whether manual changes to the live cluster are automatically reverted to match the Git repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  17.4 Service connectivity
&lt;/h3&gt;

&lt;p&gt;Test Nginx through its ClusterIP from a temporary test pod.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl run curl-test &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;curlimages/curl &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--restart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Never &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--command&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://nginx.nginx-demo.svc.cluster.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result: Nginx welcome page HTML.&lt;/p&gt;

&lt;h3&gt;
  
  
  17.5 Rolling updates
&lt;/h3&gt;

&lt;p&gt;Change the Nginx image version in Git and observe the Deployment rollout.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl rollout status deployment/nginx &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect rollout history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl rollout &lt;span class="nb"&gt;history &lt;/span&gt;deployment/nginx &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  18. Useful Troubleshooting Commands
&lt;/h2&gt;

&lt;p&gt;Check Argo CD pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; argocd &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check Argo CD services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get svc &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check Argo CD deployments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get deployments &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect a specific pod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl describe pod &amp;lt;POD_NAME&amp;gt; &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View repository server logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs deployment/argocd-repo-server &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View application controller logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs deployment/argocd-application-controller &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View CoreDNS logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl logs &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-l&lt;/span&gt; k8s-app&lt;span class="o"&gt;=&lt;/span&gt;kube-dns &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--tail&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check applications:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get applications &lt;span class="nt"&gt;-n&lt;/span&gt; argocd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check Nginx resources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get all &lt;span class="nt"&gt;-n&lt;/span&gt; nginx-demo &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  19. References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Official Argo CD Getting Started Guide: &lt;a href="https://argo-cd.readthedocs.io/en/latest/getting_started/" rel="noopener noreferrer"&gt;https://argo-cd.readthedocs.io/en/latest/getting_started/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Official Argo CD Installation Documentation: &lt;a href="https://argo-cd.readthedocs.io/en/latest/operator-manual/installation/" rel="noopener noreferrer"&gt;https://argo-cd.readthedocs.io/en/latest/operator-manual/installation/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Official CoreDNS Documentation: &lt;a href="https://coredns.io/manual/toc/" rel="noopener noreferrer"&gt;https://coredns.io/manual/toc/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kubernetes Deployments: &lt;a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="noopener noreferrer"&gt;https://kubernetes.io/docs/concepts/workloads/controllers/deployment/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kubernetes Services: &lt;a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="noopener noreferrer"&gt;https://kubernetes.io/docs/concepts/services-networking/service/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>argocd</category>
      <category>sre</category>
    </item>
    <item>
      <title># Real-World SSH: From Your Laptop to the Linux Kernel 🚀</title>
      <dc:creator>Mh Asif Kamal</dc:creator>
      <pubDate>Thu, 25 Jun 2026 17:02:33 +0000</pubDate>
      <link>https://dev.to/mhasif0786/-real-world-ssh-from-your-laptop-to-the-linux-kernel-4b1c</link>
      <guid>https://dev.to/mhasif0786/-real-world-ssh-from-your-laptop-to-the-linux-kernel-4b1c</guid>
      <description>&lt;p&gt;If you work in tech, you use SSH every day. But for a lot of developers, it's just a black box. Let’s pull back the curtain and trace a real-world hands-on sequence on an Ubuntu server to see exactly how the network handoff and Linux &lt;strong&gt;PAM (Pluggable Authentication Modules)&lt;/strong&gt; pipeline work under the hood.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Core Concept: Public vs. Private Keys
&lt;/h2&gt;

&lt;p&gt;Instead of using passwords, secure modern SSH relies on asymmetric cryptography:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Public Key:&lt;/strong&gt; Think of this like a padlock. You can hand it out to anyone or leave it on a public server. It doesn't matter who sees it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Private Key:&lt;/strong&gt; This is the physical key that opens the padlock. It stays safely on your laptop, and you &lt;strong&gt;never&lt;/strong&gt; share it.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Hands-On: Solving "Permission Denied" in Real-Time 🛠️
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: The Error
&lt;/h3&gt;

&lt;p&gt;Connecting to a cloud instance without an authorized key fails immediately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mhasifkamal@Mhs-MacBook-Air work % ssh mhasifkamal@34.131.76.231
mhasifkamal@34.131.76.231: Permission denied &lt;span class="o"&gt;(&lt;/span&gt;publickey&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Generating the Match
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;ssh-keygen&lt;/code&gt;. On modern operating systems, it automatically defaults to the highly secure &lt;strong&gt;ED25519&lt;/strong&gt; algorithm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mhasifkamal@Mhs-MacBook-Air work % ssh-keygen
Generating public/private ed25519 key pair.
Enter file in which to save the key (/Users/mhasifkamal/.ssh/id_ed25519): ssh_key
Your identification has been saved in ssh_key
Your public key has been saved in ssh_key.pub

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Verifying the Files
&lt;/h3&gt;

&lt;p&gt;Your system sets strict, private read/write privileges (&lt;code&gt;-rw-------&lt;/code&gt;) for the private key, while leaving the &lt;code&gt;.pub&lt;/code&gt; lock file readable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mhasifkamal@Mhs-MacBook-Air work % ls -l
-rw-------  1 mhasifkamal  staff  432 Jun 25 21:42 ssh_key
-rw-r--r--  1 mhasifkamal  staff  115 Jun 25 21:42 ssh_key.pub

mhasifkamal@Mhs-MacBook-Air work % cat ssh_key.pub 
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFHgEWeyk6UwHRs4VknwryjptBQcG/dYufjCJu8oq+Qe...

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: The Payoff
&lt;/h3&gt;

&lt;p&gt;Point directly to your private key file using the &lt;code&gt;-i&lt;/code&gt; flag to unlock entry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mhasifkamal@Mhs-MacBook-Air work % ssh -i ssh_key mhasifkamal@34.131.76.231 
Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 6.17.0-1018-gcp x86_64)
mhasifkamal@instance-20260620-113027:~$ 

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Where the Lock Lives 📂
&lt;/h2&gt;

&lt;p&gt;Once you log in, navigate to your home directory's hidden &lt;code&gt;.ssh&lt;/code&gt; folder. All authorized locks are stored in a single text file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mhasifkamal@instance-20260620-113027:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; .ssh/
mhasifkamal@instance-20260620-113027:~/.ssh&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;authorized_keys
mhasifkamal@instance-20260620-113027:~/.ssh&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi authorized_keys 

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Cloud setup panels and commands like &lt;code&gt;ssh-copy-id&lt;/code&gt; simply append your public key string into this &lt;code&gt;authorized_keys&lt;/code&gt; file.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Toggling Passwords &amp;amp; The Cloud Override Trap 🕸️
&lt;/h2&gt;

&lt;p&gt;Let's create a traditional password user named &lt;code&gt;test-user&lt;/code&gt; on the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mhasifkamal@instance-20260620-113027:~/.ssh$ sudo adduser test-user
New password: 
passwd: password updated successfully

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Trying to log in immediately from your laptop will still fail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mhasifkamal@Mhs-MacBook-Air work % ssh test-user@34.131.76.231
test-user@34.131.76.231: Permission denied (publickey).

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Fix
&lt;/h3&gt;

&lt;p&gt;To allow temporary password logins, you must modify the incoming SSH daemon settings. Avoid &lt;code&gt;ssh_config&lt;/code&gt; (which handles outbound client connections) and focus on the drop-in cloud override files inside &lt;code&gt;/etc/ssh/sshd_config.d/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mhasifkamal@instance-20260620-113027:/etc/ssh$ ls /etc/ssh/sshd_config.d/
50-cloudimg-settings.conf  60-cloudimg-settings.conf

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open these overrides, change the parameter to &lt;code&gt;yes&lt;/code&gt;, and restart the daemon:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /etc/ssh/sshd_config.d/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;span class="c"&gt;# Set: PasswordAuthentication yes&lt;/span&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart ssh

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, the server prompts for the password and allows authentication cleanly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mhasifkamal@Mhs-MacBook-Air work % ssh test-user@34.131.76.231
test-user@34.131.76.231's password: 
Welcome to Ubuntu 24.04.4 LTS!

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Under the Hood: The Complete Architecture Flow 🔄
&lt;/h2&gt;

&lt;p&gt;Here is exactly how the network handoff transitions directly into Linux's internal &lt;strong&gt;PAM (Pluggable Authentication Modules)&lt;/strong&gt; pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ LAPTOP ]                                                [ UBUNTU SERVER ]
    │                                                            │
    ├─── 1. Protocol Handshake (Agree on SSH versions) ─────────&amp;gt;│
    │                                                            │
    &amp;lt;─── 2. Diffie-Hellman Key Exchange (Secure Tunnel Built) ──&amp;gt;│
    │                                                            │
    &amp;lt;─── 3. Asymmetric Key Challenge (Puzzle sent to client) ────┤
    │                                                            │
    ├─── 4. Challenge Solved (Proof verified by sshd) ──────────&amp;gt;│
    │                                                            │
    │                                                   [ Hand-off to PAM Engine ]
    │                                                            │
    │                                                   ┌────────┴────────┐
    │                                                   │  /etc/pam.d/    │
    │                                                   └────────┬────────┘
    │                                                            │
    │                                                   🔒 1. common-auth
    │                                                      (Checks credentials via pam_unix.so)
    │                                                            │
    │                                                   📋 2. common-account
    │                                                      (Checks password expiration/locks)
    │                                                            │
    │                                                   🛠️ 3. common-session
    │                                                      (Sets env, umask, &amp;amp; log limits)
    │                                                            │
    &amp;lt;─── 5. Shell Opened (PTY Allocated to user) ────────────────┘

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The PAM Blueprint
&lt;/h3&gt;

&lt;p&gt;Modern Linux environments manage application access dynamically via files in &lt;code&gt;/etc/pam.d/&lt;/code&gt;. (The old master file &lt;code&gt;/etc/pam.conf&lt;/code&gt; is ignored).&lt;/p&gt;

&lt;p&gt;When we look inside the system authentication rules (&lt;code&gt;cat /etc/pam.d/common-auth&lt;/code&gt;), we see the literal logical circuit board:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;auth    [success=1 default=ignore]      pam_unix.so nullok
auth    requisite                       pam_deny.so
auth    required                        pam_permit.so

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pam_unix.so&lt;/code&gt;:&lt;/strong&gt; Checks credentials against system hashes. If successful, &lt;code&gt;[success=1]&lt;/code&gt; jumps past the next line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pam_deny.so&lt;/code&gt;:&lt;/strong&gt; The trap line. If your credentials fail, PAM stops here, breaks the circuit, and kicks you out with a &lt;code&gt;Permission denied&lt;/code&gt; error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pam_permit.so&lt;/code&gt;:&lt;/strong&gt; The green light. Passes a success flag back to the environment, allowing &lt;code&gt;common-session&lt;/code&gt; to spin up your environment variables and launch your &lt;code&gt;bash&lt;/code&gt; or &lt;code&gt;zsh&lt;/code&gt; shell.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;SSH builds the secure tunnel across the web, but PAM controls your access rights once you cross the threshold. Hardening your server by setting your drop-in configs back to &lt;code&gt;PasswordAuthentication no&lt;/code&gt; keeps the automated brute-force bots completely out of your architecture.&lt;/p&gt;

&lt;p&gt;What does your local &lt;code&gt;~/.ssh/config&lt;/code&gt; file look like? Let's chat in the comments! 👇&lt;/p&gt;

&lt;p&gt;#sre #ssh #linux #devops #security #sysadmin #tutorial&lt;/p&gt;

</description>
      <category>linux</category>
      <category>networking</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>#Kafka</title>
      <dc:creator>Mh Asif Kamal</dc:creator>
      <pubDate>Sat, 11 Dec 2021 16:18:20 +0000</pubDate>
      <link>https://dev.to/mhasif0786/kafka-hed</link>
      <guid>https://dev.to/mhasif0786/kafka-hed</guid>
      <description>&lt;p&gt;Hi all,&lt;br&gt;
As i asked in morning here about kafka resources.So today i started kafka and learn about basics of kafka. &lt;br&gt;
Things which i have learnt today.&lt;br&gt;
What is kafka?&lt;br&gt;
Kafka is basically a message queue system.It actually solve the complex problem of communication between many to many.It reduces the number of connection. It creates a medium between producer and consumer.Producer will publish message in kafka cluster and consumer will consume the message from kafka cluster.&lt;br&gt;
Components of kafka:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Producer&lt;/li&gt;
&lt;li&gt;Consumer&lt;/li&gt;
&lt;li&gt;Topic&lt;/li&gt;
&lt;li&gt;Broker&lt;/li&gt;
&lt;li&gt;Partition
I learnt about this and also install on system and publish messages and consume message.
If anything you might feel wrong please comment so that i can rectify.
Thanks .&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>#kafka</title>
      <dc:creator>Mh Asif Kamal</dc:creator>
      <pubDate>Sat, 11 Dec 2021 06:18:27 +0000</pubDate>
      <link>https://dev.to/mhasif0786/kafka-3ae3</link>
      <guid>https://dev.to/mhasif0786/kafka-3ae3</guid>
      <description>&lt;p&gt;Hi I am started learning Kafka. Suggest some good  resources,Thanks.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
