<?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: Nandkishor Khandare</title>
    <description>The latest articles on Forem by Nandkishor Khandare (@nandkishor).</description>
    <link>https://forem.com/nandkishor</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%2F2883270%2F0b140566-f3ef-4fb1-b4a3-1d59a8dba804.jpg</url>
      <title>Forem: Nandkishor Khandare</title>
      <link>https://forem.com/nandkishor</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nandkishor"/>
    <language>en</language>
    <item>
      <title>How to run the container with the help of Docker .</title>
      <dc:creator>Nandkishor Khandare</dc:creator>
      <pubDate>Wed, 14 May 2025 16:39:02 +0000</pubDate>
      <link>https://forem.com/nandkishor/how-to-run-the-container-with-the-help-of-docker--17p</link>
      <guid>https://forem.com/nandkishor/how-to-run-the-container-with-the-help-of-docker--17p</guid>
      <description>&lt;p&gt;1) Create the account on &lt;a href="https://hub.docker.com/" rel="noopener noreferrer"&gt;https://hub.docker.com/&lt;/a&gt; so you can trace your docker container/images.&lt;/p&gt;

&lt;p&gt;2) You will get the username which we required for running your container you have to configured it over the docker with username and password.&lt;/p&gt;

&lt;p&gt;3) You also need the Dockerfile to run the containers so make sure you are in the same folder where this dockerfile is present .&lt;/p&gt;

&lt;p&gt;4) Follow the below command step by step&lt;/p&gt;

&lt;p&gt;🟢 Step 1: Write a Dockerfile&lt;br&gt;
🟢 Step 2: Build Docker Image&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t &amp;lt;your-dockerhub-username&amp;gt;/&amp;lt;image-name&amp;gt;:&amp;lt;tag&amp;gt; .
# Example:
docker build -t iamnk007p/python-sample-app-demo:v1 .

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

&lt;/div&gt;



&lt;p&gt;🟢 Step 3: Verify Image is Built&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker images
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🟢 Step 4: Run Container from Image&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d -p 5000:5000 --name my-python-app iamnk007/python-sample-app-demo:v1
# -d = detached mode
# -p = port mapping (host:container)
# --name = custom container name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or you can run below command as well just make sure you are mentioning port in dockerfile&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -it iamnk007/python-sample-app-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🟢 Step 5: Check Running Containers&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🟢 Step 6: Access Application in Browser&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Open: http://localhost:5000
(Depends on your app's port)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  ✅ Push Docker Image to Docker Hub
&lt;/h2&gt;

&lt;p&gt;🟢 Step 8: Login to Docker Hub&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🟢 Step 9: Push Image to Docker Hub ( make sure you add tag (v1))&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker push iamnk00/python-sample-app-demo:v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Stopping &amp;amp; Cleaning Up&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker stop my-python-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🟢 Remove Container&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker rm my-python-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🟢 Remove Image (Optional)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker rmi iamnk007/python-sample-app-demo:v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;summary (Quick Recap Commands):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t &amp;lt;username&amp;gt;/&amp;lt;image&amp;gt;:&amp;lt;tag&amp;gt; .
docker run -d -p 5000:5000 --name &amp;lt;container-name&amp;gt; &amp;lt;username&amp;gt;/&amp;lt;image&amp;gt;:&amp;lt;tag&amp;gt;
docker ps
docker login
docker push &amp;lt;username&amp;gt;/&amp;lt;image&amp;gt;:&amp;lt;tag&amp;gt;
docker stop &amp;lt;container-name&amp;gt;
docker rm &amp;lt;container-name&amp;gt;
docker rmi &amp;lt;username&amp;gt;/&amp;lt;image&amp;gt;:&amp;lt;tag&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Guide to install Minikube on windows to practice Kubernetes and create your first pod.</title>
      <dc:creator>Nandkishor Khandare</dc:creator>
      <pubDate>Mon, 12 May 2025 09:56:02 +0000</pubDate>
      <link>https://forem.com/nandkishor/guide-to-install-minikube-on-windows-to-practice-kubernetes-and-create-your-first-pod-14o8</link>
      <guid>https://forem.com/nandkishor/guide-to-install-minikube-on-windows-to-practice-kubernetes-and-create-your-first-pod-14o8</guid>
      <description>&lt;p&gt;As a DevOps engineer we are using Kubernetes daily so for practicing it on your local machine we can set up the Minikube which help to practice the Kubernetes concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites for installing Minikube on Windows.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;2 CPUs or more&lt;/li&gt;
&lt;li&gt;2GB of free memory&lt;/li&gt;
&lt;li&gt;20GB of free disk space&lt;/li&gt;
&lt;li&gt;Internet connection&lt;/li&gt;
&lt;li&gt;Container or virtual machine manager, such as: Docker Desktop I will suggest.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Search for the Windows PowerShell on Windows right click on it and run it as an administrator &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73fd2m5dpez4gtc91zck.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73fd2m5dpez4gtc91zck.png" alt="Image description" width="510" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now run the below Commands one by one &lt;/p&gt;

&lt;p&gt;Step 1: Use the below command to download and run the installer for the latest release.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force
Invoke-WebRequest -OutFile 'c:\minikube\minikube.exe' -Uri 'https://github.com/kubernetes/minikube/releases/latest/download/minikube-windows-amd64.exe' -UseBasicParsing

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

&lt;/div&gt;



&lt;p&gt;Step 2: Add the minikube.exe binary to your PATH&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$oldPath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)
if ($oldPath.Split(';') -inotcontains 'C:\minikube'){
  [Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine)
}

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

&lt;/div&gt;



&lt;p&gt;Step 3: Start your cluster&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;minikube start

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

&lt;/div&gt;



&lt;p&gt;Step 4: See the status of the minikube if it is installed or not&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;minikube status
&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4a5wyylw23vro213di57.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4a5wyylw23vro213di57.png" alt="Image description" width="436" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are able to see the above details after running 4th command then &lt;strong&gt;Congratulations you have done the Minikube set up !!!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run your first pod on Kubernetes with the help of minikube.
&lt;/h2&gt;

&lt;p&gt;Step 1: Open the GitBash and change the directory to Download.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /c/Users/&amp;lt;your name&amp;gt;/Downloads
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Create the pod.yaml file and paste the below data into it.&lt;br&gt;
&lt;em&gt;the following is an example of a Pod which consists of a container running the image nginx:1.14.2.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - name: nginx
    image: nginx:1.14.2
    ports:
    - containerPort: 80

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

&lt;/div&gt;



&lt;p&gt;Step 3: Run the below command to create the pod with the help of the pod.yaml file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create -f pod.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will shows like below image it means pod has been created.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnd2pqyipq394ny14l19a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnd2pqyipq394ny14l19a.png" alt="Image description" width="502" height="69"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 4: Run the below command to see which pods are running in the Kubernetes.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;It will show like this &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lo88htxaq4wcedph48f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lo88htxaq4wcedph48f.png" alt="Image description" width="666" height="113"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 5: You can use the below commands according to your requirement.&lt;/p&gt;

&lt;p&gt;a. Get the all details of the pods&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;b. Show Output in Wide Format (More Details like IP, Node)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods -o wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;c.  Get Logs of a Pod (For Debugging)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl logs &amp;lt;pod-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;d. Check Pod's YAML Definition (Actual Configuration)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pod &amp;lt;pod-name&amp;gt; -o yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;e. Open Minikube Dashboard (GUI View):It will open the dashboard in the web browser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;minikube dashboard

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

&lt;/div&gt;



&lt;p&gt;That's all for the day Happy Learning !&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>minikube</category>
    </item>
    <item>
      <title>How to install Terraform on Windows and run your first project</title>
      <dc:creator>Nandkishor Khandare</dc:creator>
      <pubDate>Fri, 25 Apr 2025 14:03:29 +0000</pubDate>
      <link>https://forem.com/nandkishor/how-to-install-terraform-on-windows-and-run-your-first-project-4pko</link>
      <guid>https://forem.com/nandkishor/how-to-install-terraform-on-windows-and-run-your-first-project-4pko</guid>
      <description>&lt;p&gt;This post is helpful for installing the Terraform on windows and running your first Terraform module.&lt;br&gt;
&lt;strong&gt;Module&lt;/strong&gt;: Creating the EC2 instance with the help of Terraform &lt;br&gt;
&lt;strong&gt;Requirements&lt;/strong&gt;: AWS, Vs code and Terraform.&lt;/p&gt;

&lt;p&gt;Follow the below steps:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install the latest version of Terraform from there official documentation and AWS CLI &lt;br&gt;
Terraform: &lt;a href="https://developer.hashicorp.com/terraform/install" rel="noopener noreferrer"&gt;https://developer.hashicorp.com/terraform/install&lt;/a&gt;&lt;br&gt;
AWS CLI: &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Terraform is not like other executable .exe we just need to download it and check by opening CMD in the same folder and run the below command&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If You see the below output then congratulation its installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Terraform v1.11.4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.Now open the same folder in VS-Code and try to check there as well in the new terminal.&lt;/p&gt;

&lt;p&gt;4.Install the 2 extension now AWS Toolkit and Terraform &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS toolkit: click on the extension after installing it then click on &lt;strong&gt;View&lt;/strong&gt; from the top bar then click on &lt;strong&gt;command pallette&lt;/strong&gt; then type AWS:create credentials profile it will ask for key  and secrets give them one by one done.( you will get key from your aws ac)&lt;/li&gt;
&lt;li&gt;Terraform: just install this extension no need to do the configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create the new file main.tf and paste the data over there which we are going to use to run the terraform this data is in HCL language you can refer below documentation for that &lt;br&gt;
&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs" rel="noopener noreferrer"&gt;https://registry.terraform.io/providers/hashicorp/aws/latest/docs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Below I am providing the my Github repository link where I have store my code just replace &lt;em&gt;access key, secret key and the AMI&lt;/em&gt; according to the AWS region and add this code to you main.tf &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://github.com/I-am-nk/Terraform" rel="noopener noreferrer"&gt;https://github.com/I-am-nk/Terraform&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7.After adding code to the main.tf run the below sets of command &lt;br&gt;
 a.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform init

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

&lt;/div&gt;



&lt;p&gt;b.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform plan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;( after running this command it will ask for pem file name give the name according to you)&lt;br&gt;
 c.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;d.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform destroy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(run it only you want to destroy the script)&lt;/p&gt;

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