<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Yadav Lamichhane</title><link>http://zyadav.com/</link><description>Recent content on Yadav Lamichhane</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 20 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="http://zyadav.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Multi-Arch Docker Build with GitHub Actions</title><link>http://zyadav.com/posts/multi-arch-docker-build/</link><pubDate>Wed, 20 May 2026 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/multi-arch-docker-build/</guid><description>&lt;p&gt;In my workplace we have multiple background jobs with its own Dockerfile and business logic code with multiple dependencies. We built a github actions which builds the jobs based on the CI triggers and generate image supporting both the architecture &lt;code&gt;arm64/amd64&lt;/code&gt;. For this job to pass, developer had to wait for 20+ minutes which wasn&amp;rsquo;t efficient for developer productivity.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://i.imgur.com/4vQXlq8.png" alt="Multi-Arch Docker Build"&gt;&lt;/p&gt;
&lt;p&gt;Building a multi-arch Docker image using QEMU emulation on GitHub Actions is time consuming which can be counterproductive for developers, release managers and the entire team. In this blog post, we&amp;rsquo;ll walk through how switching to native runners reduce our build times and what the
workflow looks like in practice.&lt;/p&gt;</description></item><item><title>Log based alerting with Loki</title><link>http://zyadav.com/posts/log-based-alerting-with-loki/</link><pubDate>Sat, 27 Dec 2025 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/log-based-alerting-with-loki/</guid><description>&lt;h1 id="log-based-alerting-with-loki-on-kubernetes"&gt;Log-Based Alerting with Loki on Kubernetes&lt;/h1&gt;
&lt;p&gt;This repository documents how to deploy and operate &lt;strong&gt;log-based alerting in Kubernetes using Grafana Loki&lt;/strong&gt; as part of a complete observability stack.&lt;/p&gt;
&lt;p&gt;Instead of relying only on metrics, this setup enables &lt;strong&gt;alerts driven directly from application and system logs&lt;/strong&gt; using Loki Ruler and LogQL. This allows detection of failures, error patterns, and operational issues that are often invisible to metrics-based monitoring.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;The stack consists of the following components:&lt;/p&gt;</description></item><item><title>Scaling K8s Nodes with Karpenter</title><link>http://zyadav.com/posts/scaling-k8s-nodes-with-karpenter/</link><pubDate>Wed, 25 Jun 2025 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/scaling-k8s-nodes-with-karpenter/</guid><description>&lt;p&gt;&lt;img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*TWsqae9XH6vBN1szJKS4iw.png" alt="Karpenter"&gt;&lt;/p&gt;
&lt;p&gt;Amazon EKS is a powerful service for running Kubernetes at scale. However, without an efficient autoscaler, you’re either over-provisioning or risking under-resourcing. &lt;strong&gt;Karpenter&lt;/strong&gt;, an open-source cluster autoscaler built by AWS that dynamically launches just the right compute resources at the right time.&lt;/p&gt;
&lt;p&gt;In this guide, we’ll show you how to set up Karpenter on an Amazon EKS cluster to achieve:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Autoscaling&lt;/strong&gt;: Launch new nodes when pods are unschedulable.
&lt;strong&gt;Downscaling&lt;/strong&gt;: Remove nodes when they’re no longer needed.&lt;/p&gt;</description></item><item><title>Policy as Code: Cloudformation Guard</title><link>http://zyadav.com/posts/policy-as-code/</link><pubDate>Tue, 28 May 2024 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/policy-as-code/</guid><description>&lt;p&gt;CloudFormation Guard (cfn-guard) is a tool developed by AWS to validate CloudFormation templates against a set of predefined rules. It ensures that your infrastructure as code (IaC) complies with organizational policies, security requirements, and best practices before deployment.&lt;/p&gt;
&lt;h2 id="key-features"&gt;Key Features&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Policy-as-Code&lt;/strong&gt;: Define reusable and version-controlled rules.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validation&lt;/strong&gt;: Check CloudFormation templates against these rules.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compliance&lt;/strong&gt;: Enforce security, cost management, and operational guidelines.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integration&lt;/strong&gt;: Seamlessly integrates with CI/CD pipelines for automated checks.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="installing-cloudformation-guard"&gt;Installing CloudFormation Guard&lt;/h2&gt;
&lt;p&gt;You can install CloudFormation Guard using AWS CLI or download it from the &lt;a href="https://github.com/aws-cloudformation/cloudformation-guard/releases"&gt;releases page&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Yadav Lamichhane</title><link>http://zyadav.com/bio/</link><pubDate>Sun, 13 Aug 2023 00:00:00 +0000</pubDate><guid>http://zyadav.com/bio/</guid><description>&lt;div style="text-align: center"&gt;
&lt;img
src="http://zyadav.com/img/yadav.jpg"
style="
width: 250px;
height: 250px;
border-radius: 50%;
object-fit: cover;
box-shadow: 4px 4px 4px #333;
"
/&gt;
&lt;/div&gt;
&lt;p&gt;Hi! I&amp;rsquo;m &lt;strong&gt;Yadav Lamichhane&lt;/strong&gt;, a &lt;strong&gt;Senior Site Reliability Engineer at Cloudfactory&lt;/strong&gt;.&lt;br&gt;
I specialize in &lt;strong&gt;Linux systems, container runtimes, and kernel internals&lt;/strong&gt;, and I love exploring and contributing to open-source projects.&lt;/p&gt;
&lt;p&gt;Outside of work, you&amp;rsquo;ll usually find me &lt;strong&gt;cycling, working out, playing cricket, reading&lt;/strong&gt;, or &lt;strong&gt;writing blogs&lt;/strong&gt;.&lt;br&gt;
I&amp;rsquo;m also one of the organizing members of the &lt;a href="https://www.linkedin.com/company/devops-kathmandu"&gt;DevOps Kathmandu&lt;/a&gt; community.&lt;/p&gt;</description></item><item><title>Github Action Reusable Workflows</title><link>http://zyadav.com/posts/github-action-reusable-workflow/</link><pubDate>Thu, 25 May 2023 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/github-action-reusable-workflow/</guid><description>&lt;h1 id="github-reusable-workflows"&gt;GitHub Reusable workflows&lt;/h1&gt;
&lt;p&gt;In this blog post, we will be exploring the Github Reusable workflows and how we can leverage them. The primary purpose of reusing workflows is to avoid code duplication when we have similar repositories with similar workflows. This makes workflows easier to maintain and allows you to create new workflows more quickly by building on the work of others, just as you do with actions. Workflow reuse also promotes best practices by helping you to use workflows that are well-designed, have already been tested, and have been proven to be effective.&lt;/p&gt;</description></item><item><title>Multi-region Terraform State Files</title><link>http://zyadav.com/posts/terraform-state-file-management/</link><pubDate>Thu, 09 Sep 2021 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/terraform-state-file-management/</guid><description>&lt;hr&gt;
&lt;p&gt;On this blog post I will be discussing about the management of multi-region terraform state files in AWS Cloud which is desired approach for the design of fault tolerant infrastructure architecture.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="backend-configuration"&gt;Backend Configuration&lt;/h2&gt;
&lt;p&gt;By default terraform manages the state file named &lt;code&gt;terraform.tfstate&lt;/code&gt; on your local directory where the terraform resource files are present. Same state files can be stored remotely and considered as a good approach if we are working in a team and managing state files through CI/CD pipelines.&lt;/p&gt;</description></item><item><title>SSH into the private server through Bastion Host</title><link>http://zyadav.com/posts/ssh-through-bastion-host/</link><pubDate>Sun, 21 Feb 2021 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/ssh-through-bastion-host/</guid><description>&lt;h1 id="ssh-into-the-private-server-through-bastion-host"&gt;SSH into the private server through Bastion Host&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: center"&gt;&lt;img src="https://i.imgur.com/1mZuxec.png" alt="Connecting private server with bastion host"&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;Connecting private server with bastion host&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;A bastion host is a publicly facing server that acts as an entry-point to the system which is protected from the high-end firewall or located in a private server. These servers can only be accessible from the bastion hosts so this would reduce the attack surface area from the outside world.&lt;/p&gt;</description></item><item><title>Record Terminal Session with asciinema</title><link>http://zyadav.com/posts/record-terminal-session-with-asciinema/</link><pubDate>Fri, 17 Jul 2020 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/record-terminal-session-with-asciinema/</guid><description>&lt;p&gt;&lt;img src="https://i.imgur.com/5PKtA80.png" alt="Imgur"&gt;&lt;/p&gt;
&lt;h2 id="asciinema"&gt;ASCIINEMA&lt;/h2&gt;
&lt;p&gt;ASCIINEMA is a terminal session recorder that captures all the input and output that is being processed by the terminal. It is a lightweight text-based terminal recorder in which you can copy the terminal text and paste it elsewhere. asciinema lets you easily record terminal sessions and replay them in a terminal as well as in a web browser.&lt;/p&gt;
&lt;p&gt;The installation procedure and usage are straight forward which won’t be difficult to follow along. Furthermore, you can integrate asciinema with a terminal multiplexer(tmux) to record multiple terminal sessions within single recordings.&lt;/p&gt;</description></item><item><title>Connecting to IRC</title><link>http://zyadav.com/posts/connecting-to-irc/</link><pubDate>Fri, 01 May 2020 00:00:00 +0000</pubDate><guid>http://zyadav.com/posts/connecting-to-irc/</guid><description>&lt;h2 id="internet-relay-chat"&gt;Internet Relay Chat&lt;/h2&gt;
&lt;h2 id="1-what-is-it"&gt;1. What is it?&lt;/h2&gt;
&lt;p&gt;Internet Relay Chat abbreviated as IRC which is just another application layer protocol like FTP, SMTP, DHCP, etc. It is mainly used for communicating in the network in the form of text messages. Architecturally IRC is a client/server model which consists of IRC server and IRC clients. IRC server accepts and relays messages to the users who are connected via IRC clients.&lt;/p&gt;
&lt;p&gt;There are numerous IRC clients available on the internet which we will be describing shortly. IRC consists of numerous networks and is further divided into channels. Channels are also called rooms where users of particular interest can gather and exchange messages. Each of the channels starts with a hashtag ‘#’.&lt;/p&gt;</description></item></channel></rss>