<?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>Forem: Kartik</title>
    <description>The latest articles on Forem by Kartik (@kartik_p).</description>
    <link>https://forem.com/kartik_p</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1532235%2F67b6b0b8-7fc9-49fb-8086-a4be37660a19.png</url>
      <title>Forem: Kartik</title>
      <link>https://forem.com/kartik_p</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kartik_p"/>
    <language>en</language>
    <item>
      <title>How choose which Kubernetes Way is Right for You</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Fri, 31 Oct 2025 03:30:00 +0000</pubDate>
      <link>https://forem.com/kartik_p/how-choose-which-kubernetes-way-is-right-for-you-1jf9</link>
      <guid>https://forem.com/kartik_p/how-choose-which-kubernetes-way-is-right-for-you-1jf9</guid>
      <description>&lt;p&gt;As someone who's always digging into DevOps tools, I find that explaining a topic is the best way to really understand it. So today, I want to share what I've learned about the different ways you can run &lt;strong&gt;Kubernetes (K8s)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Getting a Kubernetes cluster started can seem tricky because there isn't just one way to do it. Let's break down the main options in simple terms.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Many Flavors of Kubernetes
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;1. Managed Services (Provides support)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of this as the easiest way to get started. Cloud providers like Amazon (&lt;strong&gt;EKS&lt;/strong&gt;), Microsoft (&lt;strong&gt;AKS&lt;/strong&gt;), and Google (&lt;strong&gt;GKE&lt;/strong&gt;) do all the heavy lifting for you. They manage the "brain" of the cluster (the Control Plane) so you don't have to.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why use it?&lt;/strong&gt; It's fast to set up and you get great support. The cloud provider handles all the tough stuff like security and updates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What's the catch?&lt;/strong&gt; It can cost more, and you have less control over the setup. You're also using that specific cloud's way of doing things.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Management Platforms (like Rancher)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you have many different Kubernetes clusters, maybe on different clouds. &lt;strong&gt;Rancher&lt;/strong&gt; is like a single, friendly dashboard that lets you manage all of them from one place.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why use it?&lt;/strong&gt; It's perfect if you need to manage multiple clusters and want a simple, consistent experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What's the catch?&lt;/strong&gt; It’s one more tool to learn and manage, but it's very helpful for complex setups.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Self-Managed with kOps (Most preferred)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the "do-it-yourself" path, where you have full control. You are in charge of setting up and managing the entire cluster. It sounds hard, but a tool called &lt;strong&gt;kOps&lt;/strong&gt; makes it much simpler.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why use it?&lt;/strong&gt; You get complete control, it can be cheaper, and you aren't locked into any single cloud provider.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What's the catch?&lt;/strong&gt; It requires more technical knowledge, and you are responsible for everything, including maintenance and upgrades.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Why is kOps so popular?
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;kOps&lt;/strong&gt; (Kubernetes Operations) is a favorite in the community because it automates the hard parts of the DIY approach. You just tell kOps what you want your cluster to look like, and it builds it for you. It’s like giving a blueprint to a robot builder—it makes the process repeatable and reliable.&lt;/p&gt;

&lt;h4&gt;
  
  
  Let's Build a Cluster with kOps!
&lt;/h4&gt;

&lt;p&gt;Now, let's get our hands dirty and see how it works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Get Your Tools Ready&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, you need to install &lt;code&gt;kubectl&lt;/code&gt;, the AWS CLI, and &lt;code&gt;kOps&lt;/code&gt; itself. You can do this on a Linux machine with these commands:&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="c"&gt;# Get your system ready&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; curl

&lt;span class="c"&gt;# Install kubectl&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; kubectl

&lt;span class="c"&gt;# Install AWS CLI&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;snap &lt;span class="nb"&gt;install &lt;/span&gt;aws-cli &lt;span class="nt"&gt;--classic&lt;/span&gt;

&lt;span class="c"&gt;# Install kOps&lt;/span&gt;
curl &lt;span class="nt"&gt;-Lo&lt;/span&gt; kops https://github.com/kubernetes/kops/releases/download/&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://api.github.com/repos/kubernetes/kops/releases/latest | &lt;span class="nb"&gt;grep &lt;/span&gt;tag_name | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'"'&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; 4&lt;span class="si"&gt;)&lt;/span&gt;/kops-linux-amd64
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x kops
&lt;span class="nb"&gt;sudo mv &lt;/span&gt;kops /usr/local/bin/kops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Connect to AWS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;aws configure&lt;/code&gt; in your terminal and provide your AWS Access Keys to connect your machine to your AWS account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Give kOps a Home&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;kOps needs a place to store your cluster's configuration. An S3 bucket is perfect for this. (Make sure to use a unique bucket name!)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api create-bucket &lt;span class="nt"&gt;--bucket&lt;/span&gt; my-kops-cluster-storage-123 &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Create the Cluster Blueprint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one command tells kOps everything it needs to know to plan your cluster.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kops create cluster &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mycluster.k8s.local &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;s3://my-kops-cluster-storage-123 &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--zones&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;us-east-1a &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--node-count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--node-size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;t2.micro &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--master-size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;t2.micro
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5: Build It!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, tell kOps to build the cluster based on the blueprint you just made.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kops update cluster &lt;span class="nt"&gt;--name&lt;/span&gt; mycluster.k8s.local &lt;span class="nt"&gt;--state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;s3://my-kops-cluster-storage-123 &lt;span class="nt"&gt;--yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will take a few minutes. Go grab a chai!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Check if it's Ready&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After a few minutes, run this command to see if your cluster is online:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kops validate cluster &lt;span class="nt"&gt;--state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;s3://my-kops-cluster-storage-123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that’s it! You’ve just created your own Kubernetes cluster. By understanding these different approaches, you can pick the one that fits your project best.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>docker</category>
      <category>ai</category>
    </item>
    <item>
      <title>Understanding 𝐊𝐮𝐛𝐞𝐫𝐧𝐞𝐭𝐞𝐬 (𝐊𝟖𝐬) 𝐚𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Thu, 30 Oct 2025 03:30:00 +0000</pubDate>
      <link>https://forem.com/kartik_p/i-learned-about--252p</link>
      <guid>https://forem.com/kartik_p/i-learned-about--252p</guid>
      <description>&lt;p&gt;I love reading blogs and documentation, so I wanted to share some knowledge I've gained. Today, I learned about 𝐊𝐮𝐛𝐞𝐫𝐧𝐞𝐭𝐞𝐬 (𝐊𝟖𝐬) 𝐚𝐫𝐜𝐡𝐢𝐭𝐞𝐜𝐭𝐮𝐫𝐞.&lt;br&gt;
Kubernetes works like a team with a brain. The brain is called the 𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐏𝐥𝐚𝐧𝐞, and it manages a group of worker computers called 𝐍𝐨𝐝𝐞𝐬. Your applications run on these Nodes inside packages called 𝐏𝐨𝐝𝐬. The Control Plane watches everything. If an app in a Pod fails, the brain automatically tells a Node to restart it, which is called auto-healing. When your app gets a lot of users, the brain tells the Nodes to create more copies of it to handle the traffic, which is called auto-scaling. In short, Kubernetes uses its brain to manage the workers, making sure your apps are always healthy, running, and ready for any amount of traffic.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>😄 Built a fun little project to calculate how ancient you are... and sneakily learned Docker in the process!</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Sun, 18 May 2025 08:12:28 +0000</pubDate>
      <link>https://forem.com/kartik_p/built-a-fun-little-project-to-calculate-how-ancient-you-are-and-sneakily-learned-docker-in-the-443f</link>
      <guid>https://forem.com/kartik_p/built-a-fun-little-project-to-calculate-how-ancient-you-are-and-sneakily-learned-docker-in-the-443f</guid>
      <description>&lt;p&gt;This is a basic Go lang project that shows your age if you know your birth year. In this, you have to input your birth year, and it will take the current year automatically. By using the formula Current Year - Birth Year, it shows your current age. This project is mainly intended to learn how to containerize an application. It is not a Go-focused project but mainly Docker-focused instead. A Dockerfile will be created to build a Docker image and run it inside a container.&lt;/p&gt;

&lt;p&gt;Once containerized, the application can be run easily using Docker commands on any system that supports Docker, regardless of the host environment. This helps demonstrate the power of containerization and the portability it brings to software development.&lt;/p&gt;

&lt;p&gt;The project will also serve as a base to practice Docker fundamentals like:&lt;/p&gt;

&lt;p&gt;-&amp;gt; Writing a Dockerfile&lt;/p&gt;

&lt;p&gt;-&amp;gt; Building a lightweight image for a Go application&lt;/p&gt;

&lt;p&gt;-&amp;gt; Running the image as a container&lt;/p&gt;

&lt;p&gt;-&amp;gt; Understanding how to manage input/output inside the container&lt;/p&gt;

&lt;p&gt;Overall, this project provides a practical, beginner-friendly example of containerizing a simple application — making it a great starting point for learning Docker and DevOps workflows.&lt;/p&gt;

&lt;p&gt;Setup and Usage&lt;br&gt;
📝 Step 1: Clone the repository:&lt;br&gt;
git clone &lt;a href="https://github.com/kartik-paliwa1/Know-Your-Age" rel="noopener noreferrer"&gt;https://github.com/kartik-paliwa1/Know-Your-Age&lt;/a&gt;&lt;br&gt;
cd Know-Your-Age&lt;/p&gt;

&lt;p&gt;📝Step 2: Create a Dockerfile:&lt;br&gt;
FROM golang:1.20-alpine&lt;/p&gt;

&lt;p&gt;WORKDIR /app&lt;/p&gt;

&lt;p&gt;COPY . .&lt;/p&gt;

&lt;p&gt;RUN go build -o age-calculator Main.go&lt;/p&gt;

&lt;p&gt;CMD ["./age-calculator"]&lt;/p&gt;

&lt;p&gt;🛠️ Step 3: Build the Docker Image&lt;br&gt;
docker build -t age-calculator .&lt;/p&gt;

&lt;p&gt;(-t age-calculator: Tags the image with a custom name&lt;br&gt;
.: Refers to the current directory as the Docker context)&lt;/p&gt;

&lt;p&gt;▶️ Step 4: Run the Docker Container&lt;br&gt;
docker run -it age-calculator&lt;/p&gt;

&lt;p&gt;When prompted, enter your birth year inside the container and see your age output.&lt;/p&gt;

&lt;p&gt;Refer to my Github repository for my project : [&lt;a href="https://github.com/kartik-paliwa1/Know-Your-Age" rel="noopener noreferrer"&gt;https://github.com/kartik-paliwa1/Know-Your-Age&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>go</category>
      <category>microservices</category>
    </item>
    <item>
      <title>How to install ansible and run your first ansible Ad-Hoc Command.</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Thu, 05 Dec 2024 21:07:08 +0000</pubDate>
      <link>https://forem.com/kartik_p/how-to-install-ansible-and-run-your-first-ansible-ad-hoc-command-3eji</link>
      <guid>https://forem.com/kartik_p/how-to-install-ansible-and-run-your-first-ansible-ad-hoc-command-3eji</guid>
      <description>&lt;h2&gt;
  
  
  Install Ansible and Run Your First Playbook
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create two EC2 instances&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Main instance&lt;/strong&gt;: Install Ansible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Target instance&lt;/strong&gt;: The system to configure.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Step 1: Install Ansible on the Main Instance
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Commands&lt;/strong&gt;:&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;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;ansible
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ansible &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 2: Set Up Passwordless Authentication
&lt;/h3&gt;

&lt;h4&gt;
  
  
  On the Main Instance:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Generate an SSH Key Pair&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ssh-keygen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The public key is usually located at &lt;code&gt;~/.ssh/id_rsa.pub&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Copy the Public Key&lt;/strong&gt;:
Open the file with a text editor (e.g., &lt;code&gt;vim&lt;/code&gt;) and copy its contents.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  On the Target Instance:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Log in&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ssh &amp;lt;username&amp;gt;@&amp;lt;target_server_ip&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Paste the Public Key&lt;/strong&gt; into &lt;code&gt;~/.ssh/authorized_keys&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   vim ~/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save changes with &lt;code&gt;:wq&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Test SSH&lt;/strong&gt;:
From the main instance:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ssh &amp;lt;target_server_ip&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Passwordless authentication should now work.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 3: Create an Inventory File
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create a file named &lt;code&gt;inventory&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;   &lt;span class="nn"&gt;[webservers]&lt;/span&gt;
   &lt;span class="err"&gt;192.168.1.10&lt;/span&gt;
   &lt;span class="err"&gt;192.168.1.11&lt;/span&gt;

   &lt;span class="nn"&gt;[databases]&lt;/span&gt;
   &lt;span class="err"&gt;192.168.1.20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 4: Run Ad-Hoc Commands
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run a Command Across All Servers&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ansible &lt;span class="nt"&gt;-i&lt;/span&gt; inventory all &lt;span class="nt"&gt;-m&lt;/span&gt; shell &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="s2"&gt;"command_to_execute"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Example&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ansible &lt;span class="nt"&gt;-i&lt;/span&gt; inventory webservers &lt;span class="nt"&gt;-m&lt;/span&gt; shell &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="s2"&gt;"ls -la"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 5: Write and Run Playbooks
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a Playbook&lt;/strong&gt; (e.g., &lt;code&gt;playbook.yml&lt;/code&gt;):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;   &lt;span class="s"&gt;---&lt;/span&gt;
   &lt;span class="s"&gt;- name&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update and upgrade systems&lt;/span&gt;
     &lt;span class="s"&gt;hosts&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s"&gt;all&lt;/span&gt;
     &lt;span class="s"&gt;become&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yes&lt;/span&gt;
     &lt;span class="s"&gt;tasks&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;
       &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update package lists&lt;/span&gt;
         &lt;span class="na"&gt;apt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
           &lt;span class="na"&gt;update_cache&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yes&lt;/span&gt;
       &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Upgrade packages&lt;/span&gt;
         &lt;span class="na"&gt;apt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
           &lt;span class="na"&gt;upgrade&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the Playbook&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ansible-playbook playbook.yml &lt;span class="nt"&gt;-i&lt;/span&gt; inventory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;By following these steps, you’ll have a basic Ansible setup to manage your infrastructure effortlessly.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ansible</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Deploying a web application on AWS</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Sun, 28 Jul 2024 18:07:42 +0000</pubDate>
      <link>https://forem.com/kartik_p/deploying-a-web-application-on-aws-4bd6</link>
      <guid>https://forem.com/kartik_p/deploying-a-web-application-on-aws-4bd6</guid>
      <description>&lt;p&gt;Recently, I embarked on a journey to deploy a web application on Amazon Web Services (AWS), and I'm excited to share the process with you. This blog post will guide you through the steps I took to get my application up and running on AWS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Steps:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Local Testing:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Clone the repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up environment variables in a .env file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install dependencies and start the project using npm.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;AWS EC2 Setup:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create an IAM user with admin permissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Launch an EC2 instance using an Ubuntu image and a t2.micro instance type.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect to the instance using SSH.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update packages and install Git, Node.js, and npm.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Deployment on AWS:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Clone the repository on the remote VM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up environment variables.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assign an Elastic IP to the EC2 instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install dependencies and start the project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update security group inbound rules to allow traffic on the specified port.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project is then successfully deployed on AWS.🎉&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For an in-depth learning experience and detailed steps, refer to my &lt;a href="https://github.com/kartik-paliwa1/Portofolio-API" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;.&lt;/strong&gt;&lt;br&gt;
Happy deploying! 🚀&lt;/p&gt;

&lt;p&gt;Feel free to leave any comments or questions below, and I'll be happy to help you with your deployment journey!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>devops</category>
      <category>aws</category>
    </item>
    <item>
      <title>Github API integration project /Automating Github</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Wed, 24 Jul 2024 19:55:55 +0000</pubDate>
      <link>https://forem.com/kartik_p/github-api-integration-project-automating-github-4ph8</link>
      <guid>https://forem.com/kartik_p/github-api-integration-project-automating-github-4ph8</guid>
      <description>&lt;p&gt;This project automates the process of retrieving and displaying user access information for any GitHub repository. By leveraging the GitHub API, this shell script can provide detailed insights into who has read, write, and admin access to a repository. This tool is particularly useful for DevOps engineers and project managers who need to audit repository access regularly.&lt;/p&gt;

&lt;p&gt;How It Works&lt;/p&gt;

&lt;p&gt;Setting Up: Start by exporting your GitHub username and personal access token as environment variables to keep them secure.&lt;/p&gt;

&lt;p&gt;Running the Script: Execute the script with the desired repository owner and name as command line arguments.&lt;/p&gt;

&lt;p&gt;Output Interpretation: The script uses the curl command to make API requests and jq to parse the JSON response, displaying users with specific access levels.&lt;/p&gt;

&lt;p&gt;If you want to create the project, follow these detailed steps:&lt;/p&gt;

&lt;p&gt;Step 1: Create a GitHub Organization and Repository&lt;br&gt;
-Create a GitHub Organization:&lt;br&gt;
-Go to GitHub.&lt;br&gt;
-Click on your profile picture in the top-right corner and select "Your organizations."&lt;br&gt;
-Click "New organization."&lt;br&gt;
-Choose "Create a free organization" and fill in the required details such as organization name and email.&lt;/p&gt;

&lt;p&gt;Create a Repository:&lt;br&gt;
-Within your organization, click "New" to create a new repository.&lt;br&gt;
-Name the repository and choose the visibility (public or private).&lt;/p&gt;

&lt;p&gt;Step 2: Prepare Your Environment&lt;br&gt;
-Install Required Tools:&lt;br&gt;
Ensure you have curl installed. This tool will be used to make API requests.&lt;br&gt;
-Install jq for parsing JSON data:&lt;br&gt;
   sudo apt install jq -y&lt;/p&gt;

&lt;p&gt;Step 3: Write the Shell Script or clone it:&lt;br&gt;
-Create the Shell Script :&lt;br&gt;
Create a new shell script file, for example, list_users.sh.&lt;/p&gt;

&lt;p&gt;Write the code from &lt;a href="https://github.com/kartik-paliwa1/shell-script-for-API-integration/blob/main/list-users.sh" rel="noopener noreferrer"&gt;https://github.com/kartik-paliwa1/shell-script-for-API-integration/blob/main/list-users.sh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-Or you can directly clone it:&lt;br&gt;
Write the below command to clone the repo.&lt;/p&gt;

&lt;p&gt;git clone &lt;a href="https://github.com/kartik-paliwa1/shell-script-for-API-integration" rel="noopener noreferrer"&gt;https://github.com/kartik-paliwa1/shell-script-for-API-integration&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-Then open repo:&lt;br&gt;
   cd shell-script-for-API-integration&lt;/p&gt;

&lt;p&gt;-Write your github user-name and your token:&lt;br&gt;
  export GITHUB_USERNAME="your_username"&lt;br&gt;
  export GITHUB_TOKEN="your_token"&lt;/p&gt;

&lt;p&gt;Step 4: Execute the Script&lt;br&gt;
-Set the File Permissions:&lt;br&gt;
  chmod 777 list_users.sh&lt;/p&gt;

&lt;p&gt;-Run the Script:&lt;br&gt;
Execute the script with your repository details:&lt;br&gt;
  ./list_users.sh 'Organisation-name' 'Repo-name'&lt;/p&gt;

&lt;p&gt;Step 5: Verify the Output:&lt;br&gt;
The script should output the list of users with read access to the specified repository. For example:&lt;br&gt;
Output:&lt;br&gt;
  kartik-paliwa1 has access to shell-script-for-API-integration&lt;/p&gt;

&lt;p&gt;Credits: Learned this project from YT channel Abhishek.Veeramalla&lt;/p&gt;

</description>
      <category>devops</category>
      <category>github</category>
      <category>automation</category>
      <category>api</category>
    </item>
    <item>
      <title>My Journey to DevOps: Building an AWS Resource Tracker with Shell Scripting and AWS CLI</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Fri, 19 Jul 2024 18:11:55 +0000</pubDate>
      <link>https://forem.com/kartik_p/my-journey-to-devops-building-an-aws-resource-tracker-with-shell-scripting-and-aws-cli-238n</link>
      <guid>https://forem.com/kartik_p/my-journey-to-devops-building-an-aws-resource-tracker-with-shell-scripting-and-aws-cli-238n</guid>
      <description>&lt;p&gt;I am excited to share that I have learned how to create a real-time shell script project for DevOps on AWS. This project involves creating a shell script to track AWS resources such as EC2 instances, S3 buckets, Lambda functions, and IAM users using the technologies like Shell scripting, AWS CLI, AWS Instances, Cron jobs, JQ (JSON parser). This can be an essential tool for efficient resource management, maintaining cost-effectiveness and generating daily reports in any cloud infrastructure.&lt;/p&gt;

&lt;p&gt;Firstly I learned How to efficiently create and connect to virtual machines (VMs) using AWS services. After logging into an AWS EC2 instance through the AWS console and terminal, connect it to an EC2 instance. Should know that using the console is not efficient for DevOps engineers who frequently manage multiple VMs. Instead using terminal tools such as iTerm for Mac or alternatives like Putty, MobaXterm, and NoMachine for Windows. Next, logging into an EC2 instance using the terminal, knowing the importance of using the correct public IP and key pair for authentication, configure the terminal to secure the pem file permissions before successfully logging into the instance. Next, AWS CLI installation, configure, and use it to interact with AWS services. Then leveraged AWS documentation extensively to understand commands and their usage.&lt;/p&gt;

&lt;p&gt;This project not only honed my skills in AWS and DevOps but also demonstrated the power of effective learning resources and documentation. A big shoutout to the community and the tutorial creator: Abhishek Veeramalla on YT for making this learning experience possible!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhno7mji9yf2t0105cuvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhno7mji9yf2t0105cuvc.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4rhp1xfpsaxoveufj0q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4rhp1xfpsaxoveufj0q.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloudcomputing</category>
      <category>awscli</category>
    </item>
    <item>
      <title>Starting my DevOps journey with: Linux (Basic commands)</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Fri, 19 Jul 2024 18:02:59 +0000</pubDate>
      <link>https://forem.com/kartik_p/starting-my-devops-journey-with-linux-basic-commands-1pmp</link>
      <guid>https://forem.com/kartik_p/starting-my-devops-journey-with-linux-basic-commands-1pmp</guid>
      <description>&lt;p&gt;I have learned a lot about the basics of Linux commands and gained knowledge in this field. The Linux operating system is very handy and is the go-to operating system for any developer. Linux gives developers the freedom to make changes to the operating system according to the requirements of the work. With its powerful command line interface, developers can automate tasks, manage files, and control system processes with ease. Additionally, the flexibility and open-source nature of Linux allow for extensive customization and optimization, making it an ideal choice for both beginners and experienced professionals. Whether you are developing software, managing servers, or just learning about operating systems, Linux provides the tools and environment to excel in your work.&lt;/p&gt;

&lt;p&gt;Here are some of the basic commands I read :&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyp9y83bgnob7xr4ka2h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyp9y83bgnob7xr4ka2h.png" alt="Image description" width="637" height="710"&gt;&lt;/a&gt; &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpv640qenq2dbm3ujyohy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpv640qenq2dbm3ujyohy.png" alt="Image description" width="639" height="809"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Starting my DevOps journey with: Linux (Basic commands)</title>
      <dc:creator>Kartik</dc:creator>
      <pubDate>Mon, 27 May 2024 05:10:37 +0000</pubDate>
      <link>https://forem.com/kartik_p/starting-my-devops-journey-with-linux-basic-commands-ne7</link>
      <guid>https://forem.com/kartik_p/starting-my-devops-journey-with-linux-basic-commands-ne7</guid>
      <description>&lt;p&gt;I have learned a lot about the basics of Linux commands and gained knowledge in this field. The Linux operating system is very handy and is the go-to operating system for any developer. Linux gives developers the freedom to make changes to the operating system according to the requirements of the work. With its powerful command line interface, developers can automate tasks, manage files, and control system processes with ease. Additionally, the flexibility and open-source nature of Linux allow for extensive customization and optimization, making it an ideal choice for both beginners and experienced professionals. Whether you are developing software, managing servers, or just learning about operating systems, Linux provides the tools and environment to excel in your work.&lt;/p&gt;

&lt;p&gt;Here are some of the basic commands I read :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffukxjlgw3n9nh00im792.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffukxjlgw3n9nh00im792.png" alt="Image description" width="637" height="710"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9hje4wm3i8tfex5ha1r4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9hje4wm3i8tfex5ha1r4.png" alt="Image description" width="639" height="809"&gt;&lt;/a&gt;&lt;/p&gt;

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