<?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: Krishnamohan Yerrabilli</title>
    <description>The latest articles on Forem by Krishnamohan Yerrabilli (@krishnamohan_yerrabilli).</description>
    <link>https://forem.com/krishnamohan_yerrabilli</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%2F660759%2F7fe4e91f-b7ee-495a-a4d9-0a67b7197c1c.jpg</url>
      <title>Forem: Krishnamohan Yerrabilli</title>
      <link>https://forem.com/krishnamohan_yerrabilli</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/krishnamohan_yerrabilli"/>
    <language>en</language>
    <item>
      <title>Getting started with Kubernetes Namespaces</title>
      <dc:creator>Krishnamohan Yerrabilli</dc:creator>
      <pubDate>Fri, 21 Oct 2022 03:25:48 +0000</pubDate>
      <link>https://forem.com/krishnamohan_yerrabilli/getting-started-with-kubernetes-namespaces-483l</link>
      <guid>https://forem.com/krishnamohan_yerrabilli/getting-started-with-kubernetes-namespaces-483l</guid>
      <description>&lt;p&gt;It's crucial to understand that Kubernetes namespaces are not the &lt;br&gt; same as Linux kernel namespaces. &lt;/p&gt;

&lt;p&gt;Kernel and Namespaces divide operating systems into virtual operating &lt;br&gt; systems called containers.  &lt;/p&gt;

&lt;p&gt;Kubernetes Namespaces Divide Kubernetes cluster into virtual clusters, &lt;br&gt;which you might call Namespaces. &lt;/p&gt;

&lt;p&gt;Before we dive into Namespaces, First, let's understand some terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terminologies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Container
&lt;/h3&gt;

&lt;p&gt;A container is nothing but a ready-made software package &lt;br&gt;
that contains everything needed to run an app from code to application&lt;br&gt; &lt;/p&gt;

&lt;p&gt;system libraries, default values ​​for required settings, and any runtime it needs a containerholds everything.&lt;/p&gt;
&lt;h3&gt;
  
  
  Cluster
&lt;/h3&gt;

&lt;p&gt;Each container runs on a cluster. It consists of a &lt;br&gt;
Control plane and computer machine nodes. &lt;/p&gt;
&lt;h3&gt;
  
  
  The control plane
&lt;/h3&gt;

&lt;p&gt;Takes care of the applications running on &lt;br&gt;
the cluster and the resources they use, while the nodes are the &lt;br&gt;
machines on which the clusters run.&lt;/p&gt;
&lt;h3&gt;
  
  
  Orchestration
&lt;/h3&gt;

&lt;p&gt;Ever seen an orchestra? The orchestra conductor decides what &lt;br&gt;
sound he wants, how many violins, how many trumpets, what octave and everything else. &lt;/p&gt;

&lt;p&gt;Similarly, orchestration determines which container to use, &lt;br&gt;
which resources to use, which application to run, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt; comes from the Greek word meaning &lt;br&gt;&lt;br&gt;
sailing master or pilot. Simply put, it means a &lt;br&gt;&lt;br&gt;
person who has substantial control over operations. &lt;/p&gt;

&lt;p&gt;This is what Kubernetes does. &lt;/p&gt;

&lt;p&gt;It manages clusters, their deployment, scaling, etc.&lt;/p&gt;

&lt;p&gt;Now let's dig into “Kubernetes Namespaces”&lt;/p&gt;
&lt;h2&gt;
  
  
  Kubernetes Namespaces 'N'
&lt;/h2&gt;

&lt;p&gt;So What is Kubernetes Namespace?&lt;/p&gt;

&lt;p&gt;With the help of Namespaces, each cluster is divided into virtual sub-clusters.&lt;/p&gt;

&lt;p&gt;Each team can work in a Namespace without disturbing others.&lt;br&gt;
An application and its dependencies are stored in Namespaces in a cluster.&lt;/p&gt;

&lt;p&gt;These Namespaces are separate from each other &lt;br&gt;
but are allowed to communicate with each other.&lt;/p&gt;

&lt;p&gt;It's Namespaces that allow projects and team members to share a cluster.&lt;/p&gt;

&lt;p&gt;Let us understand this by comparing how things have changed &lt;br&gt;
and how these technologies are evolving&lt;/p&gt;

&lt;p&gt;The process by which application development takes place.&lt;/p&gt;

&lt;p&gt;Earlier resource allocation was a problem. An application consumes a lot of resources&lt;/p&gt;

&lt;p&gt;This causes other applications to underperform. Organizations cannot afford to deploy multiple physical servers.&lt;/p&gt;
&lt;h2&gt;
  
  
  Virtualization and Containers
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TvRTvGsR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9jbdse257h0zyxz58mf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TvRTvGsR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9jbdse257h0zyxz58mf.png" alt="Image description" width="880" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is where the concept of virtualization came into the picture and &lt;br&gt;
provided a viable solution to the above problem.&lt;/p&gt;

&lt;p&gt;With the help of virtualization software, it is possible to run multiple virtual machines on a single CPU.&lt;/p&gt;

&lt;p&gt;This has saved organizations from the additional costs of purchasing and maintaining additional hardware.&lt;/p&gt;

&lt;p&gt;Virtualization also provides scalability as resources can be added or removed at any time without disturbing other VMs. &lt;/p&gt;

&lt;p&gt;It also demonstrated improved security as the VM was not accessed by other VMs.&lt;/p&gt;

&lt;p&gt;This is the age of Kubernetes, where containers simplify application development and make the whole process much simpler.&lt;/p&gt;

&lt;p&gt;These containers are similar to virtual machines but are lighter. &lt;/p&gt;

&lt;p&gt;They relax discrete features as they can be shared across multiple os, have their own CPU space, memory, etc., &lt;br&gt;
and they are isolated from their respective infrastructure.&lt;/p&gt;
&lt;h2&gt;
  
  
  Types of Kubernetes Namespaces
&lt;/h2&gt;

&lt;p&gt;While writing this blog (Oct 3/ 2022) Kubernetes has four Namespaces, this may change in future&lt;/p&gt;
&lt;h3&gt;
  
  
  default
&lt;/h3&gt;

&lt;p&gt;it has a default Namespace for objects that have no other Namespace.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pod&lt;/li&gt;
&lt;li&gt;Services
&lt;/li&gt;
&lt;li&gt;Deployment...&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  kube-system
&lt;/h3&gt;

&lt;p&gt;Namespace for Kubernetes system-derived objects.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kube-DNS&lt;/li&gt;
&lt;li&gt;Holds master process&lt;/li&gt;
&lt;li&gt;kubectl process&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  kube-public
&lt;/h3&gt;

&lt;p&gt;This Namespace is used for resources that should be publicly available to all users.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cluster-info&lt;/li&gt;
&lt;li&gt;ConfigMap&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  kube-nodelease
&lt;/h3&gt;

&lt;p&gt;Used to track the health of the node&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allocated to each node(object) &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Default Namespace
&lt;/h2&gt;

&lt;p&gt;This is a Namespace automatically created by Kubernetes.&lt;br&gt;
This Namespace includes pods, services, and deployment&lt;br&gt;
Can be accessed by every user (even unauthenticated ones).&lt;/p&gt;
&lt;h2&gt;
  
  
  Viewing Namespaces
&lt;/h2&gt;

&lt;p&gt;You can see your current Namespaces using the following command:&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 namespaces
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lists your current Namespaces, their status, etc.&lt;/p&gt;

&lt;p&gt;Command to get more info about a particular Namespace&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Get Kubectl Namespaces 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also get a detailed description of a specific Namespace by using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Kubectl describes the Namespace 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Description Shows resource quota (if specified) and resource range, a resource quota shows the total resources a Namespace can use, and the resource range shows the minimum or maximum resources that can be consumed.&lt;/p&gt;

&lt;p&gt;It also shows whether the Namespace is active or terminating. These are the two designations of any Namespace. &lt;/p&gt;

&lt;p&gt;The active Namespace is in current use, while the terminating Namespace is being dropped and is no longer in use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a New Namespace
&lt;/h2&gt;

&lt;p&gt;We can create a new Namespace in two ways:&lt;/p&gt;

&lt;h3&gt;
  
  
  Imperative way
&lt;/h3&gt;

&lt;p&gt;Simply run the command:&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 Namespace 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Declarative way
&lt;/h3&gt;

&lt;p&gt;We can also create a YAML file with the following contents: &lt;/p&gt;

&lt;p&gt;Newspace.yaml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kind: Namespace
apiVersion: v1
metadata:
name: newspace
labels:
name: newspace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





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

&lt;/div&gt;



&lt;p&gt;It is easy to create a new Namespace.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to share a cluster with Namespaces?
&lt;/h2&gt;

&lt;p&gt;A Namespace allows teams to share a Kubernetes cluster&lt;br&gt;
it allows you to create Virtual cluster's inside the existing &lt;a href="https://kubernetes.io/docs/concepts/architecture/"&gt;cluster&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although your current environment is not changed to your new namespace it's time-consuming and also not efficient to type --namespace with kubectl command &lt;/p&gt;

&lt;p&gt;Let's see a simple hack, how you can switch your current default Namespace to your preferred Namespace&lt;/p&gt;
&lt;h2&gt;
  
  
  Hack to switch between Namespaces
&lt;/h2&gt;

&lt;p&gt;The command to view Namespaces&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;To switch Namespaces&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubens newspace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it, now all your commands only work within your  &lt;code&gt;newspace&lt;/code&gt; Namespace&lt;/p&gt;

&lt;p&gt;How to switch back, it's so simple&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubens default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Deleting a Namespace
&lt;/h2&gt;

&lt;p&gt;Delete any particular Namespace by using this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Kubectl delete Namespace 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the command is executed, Namespace will pop up a “Terminating” status for a while.&lt;/p&gt;

&lt;p&gt;Congratulations Now, you can create, view, or delete Namespaces. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why Should You Use Kubernetes Namespaces?
&lt;/h2&gt;

&lt;p&gt;it's time to understand why Kubernetes Namespaces are crucial and what are their advantages:&lt;/p&gt;

&lt;p&gt;A Namespace is used by a specific team, which increases the sense of accountability through better role-based access control.&lt;/p&gt;

&lt;p&gt;Namespaces allow teams to work in their respective bubbles without interfering with and disrupting others.&lt;/p&gt;

&lt;p&gt;With Namespaces, it is possible to carry out the development, testing, and production of applications in different containers.&lt;/p&gt;

&lt;p&gt;A resource quota divides the number of resources that users and teams can use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using multiple Namespaces
&lt;/h2&gt;

&lt;p&gt;In smaller organizations, where development, testing, and production teams work side by side, the default Namespace is sufficient. &lt;/p&gt;

&lt;p&gt;Development and testing do not require isolation and, therefore, can work with a single default Namespace.&lt;/p&gt;

&lt;p&gt;But if the team is large or expanding day by day, multiple Namespaces will be required. &lt;/p&gt;

&lt;h2&gt;
  
  
  Use-case of multiple Namespaces
&lt;/h2&gt;

&lt;p&gt;Development and testing can be clustered as one team, and production can be isolated so that any changes made by development and testing do not affect production. &lt;/p&gt;

&lt;p&gt;Throughout the entire lifecycle of the application, both teams can work in their respective Namespaces.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading my blog. If you like my work feel free to connect me on &lt;a href="https://www.linkedin.com/in/krishnamohanyerrabilli"&gt; LinkedIn &lt;/a&gt; or &lt;a href="https://www.twitter.com/K_Mohan_"&gt;Twitter&lt;/a&gt;, see you with another one guys.  &lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cloudnative</category>
      <category>containerapps</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Understanding Kubernetes Deployments</title>
      <dc:creator>Krishnamohan Yerrabilli</dc:creator>
      <pubDate>Sun, 16 Oct 2022 04:08:56 +0000</pubDate>
      <link>https://forem.com/krishnamohan_yerrabilli/understanding-kubernetes-deployments-3h9o</link>
      <guid>https://forem.com/krishnamohan_yerrabilli/understanding-kubernetes-deployments-3h9o</guid>
      <description>&lt;h2&gt;
  
  
  Kubernetes deployments:
&lt;/h2&gt;

&lt;p&gt;Kubernetes deployments provide information about the characteristics of a particular application or server to the orchestration operating system.  Kubernetes deployments serve as pointers to how Kubernetes servers should deploy and develop pods.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why should we use Kubernetes deployments?
&lt;/h3&gt;

&lt;p&gt;Developing applications is very risky when you are not using a stable and compatible platform. With a stable orchestration platform like Kubernetes, application development becomes more effortless. &lt;/p&gt;

&lt;p&gt;In Kubernetes applications, small changes and transformations are required to improve customer satisfaction. Implementing small and less important changes repeatedly can be a challenge for developers. Through Kubernetes deployments, you can make small and simple changes to your Kubernetes applications.&lt;/p&gt;

&lt;p&gt;Once you start using Kubernetes deployments, you will rarely experience connectivity failures and server downtimes. With Kubernetes deployments, it is possible to consistently and effectively monitor server health. Kubernetes deployments make scaling and running containerized applications seamless and effortless.&lt;/p&gt;

&lt;p&gt;Most of the Kubernetes functions are automated, k8s automated tasks depend on the Kubernetes deployment. Deploying pods into Kubernetes clusters can also be automated and you don't have to worry about deploying pods on time.&lt;/p&gt;

&lt;p&gt;Manual deployments are often time-consuming and tedious, while automated deployments are more error-free and faster.&lt;/p&gt;

&lt;p&gt;On top of all of the above, Kubernetes deployments ensure that your pods are running successfully. Furthermore, Kubernetes deployments ensure that your pods and deployments are running on Kubernetes nodes.&lt;/p&gt;

&lt;p&gt;These are the advantages you can get when you use Kubernetes deployments to manage application development.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use cases:
&lt;/h3&gt;

&lt;p&gt;Kubernetes extensions are often used by developers to expose new states of Kubernetes pods. Updating&lt;/p&gt;

&lt;p&gt;PodTemplateSec allows you to update the new states of your existing pods with Kubernetes deployments.&lt;/p&gt;

&lt;p&gt;This process revolves around transferring pods from an existing replicaset to the created replicaset. Each time you create a new ReplicaSet, the ReplicaSet comes with updated versions of the pods.&lt;/p&gt;

&lt;p&gt;Kubernetes deployments are used for new replicaset roles. Pods are generated as background tasks when a new replicaset is created.&lt;/p&gt;

&lt;p&gt;Many Kubernetes deployments handle redundant workloads in Kubernetes clusters. Furthermore, Kubernetes deployments allow you to switch back to previous versions whenever you want.&lt;/p&gt;

&lt;p&gt;You can also delete replicasets using Kubernetes deployments.&lt;/p&gt;

&lt;p&gt;Additionally, PodTemplateSec issues that arise when you pause deployment in your Kubernetes cluster can be easily resolved with the help of Kubernetes Deployment.&lt;/p&gt;

&lt;p&gt;You have the opportunity to track the progress of the application development process that you started with deployments.&lt;/p&gt;

&lt;p&gt;In short, Kubernetes deployments can greatly improve your user experience and help you use your pods and containers efficiently.&lt;/p&gt;

&lt;h3&gt;
  
  
  A recreated strategy
&lt;/h3&gt;

&lt;p&gt;This deployment method involves replacing existing pods with new pods. In this strategy, you must delete the old pods in your Kubernetes cluster before deploying the new ones.&lt;/p&gt;

&lt;p&gt;You can deploy new pods and run them immediately after deleting old pods. When you choose this deployment strategy, you cannot run old pods and new pods simultaneously in your Kubernetes cluster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Blue/green strategy
&lt;/h3&gt;

&lt;p&gt;This deployment strategy is the exact opposite of the reinvented deployment strategy. In this manner, you can deploy new pods into your cluster when your cluster has old and outdated pods. Due to this unique feature, this deployment strategy is friendly to switch back to old pods if you face any discomfort with the newly deployed pods.&lt;/p&gt;

&lt;p&gt;These Kubernetes deployment strategies are widely used to deploy, monitor, or customize Kubernetes pods. Apart from these, Canary deployment and A/B testing deployment strategies are also practiced.&lt;/p&gt;

&lt;h3&gt;
  
  
  Canary strategy
&lt;/h3&gt;

&lt;p&gt;Canary deployment is used to allow a subset of users to test a new version of an application or when you are not completely confident in the new version's functionality.&lt;/p&gt;

&lt;p&gt;This involves running the new version of the application alongside the old version with the old version of the application serving a large number of users and the new version serving a small group of test users. If the new strategy is successful it will be rolled out to more users.&lt;/p&gt;


&lt;br&gt;


&lt;p&gt;That's it, if you want to learn more about deployments, you can check out &lt;a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading my blog. If you like my work feel free to connect me on &lt;a href="https://www.linkedin.com/in/krishnamohanyerrabilli"&gt; LinkedIn &lt;/a&gt; or &lt;a href="https://www.twitter.com/K_Mohan_"&gt;Twitter&lt;/a&gt;, see you with another one guys, have a great day.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cloudnative</category>
      <category>containerapps</category>
      <category>devops</category>
    </item>
    <item>
      <title>Blue/Green Deployments</title>
      <dc:creator>Krishnamohan Yerrabilli</dc:creator>
      <pubDate>Wed, 05 Oct 2022 02:30:41 +0000</pubDate>
      <link>https://forem.com/krishnamohan_yerrabilli/bluegreen-deployments-1ig6</link>
      <guid>https://forem.com/krishnamohan_yerrabilli/bluegreen-deployments-1ig6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;A blue/green deployment involves deploying the new application version (green) alongside the old (blue).&lt;/p&gt;

&lt;p&gt;A load balancer in the form of a Service Selector object is used to test and redirect traffic to&lt;br&gt;
the new application (green) instead of the old one when verified.&lt;/p&gt;

&lt;p&gt;Blue/Green deployments can prove costly due to the need to sustain twice the amount of application resources for the duration of the deployment.&lt;/p&gt;

&lt;p&gt;To start this, we set up a service that sits in front of deployments.&lt;/p&gt;

&lt;p&gt;For example, the service selector section of the manifest file for a blue deployment for an app called web-app with v1.0.0 looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type: Service
Metadata:
 Name: web-app-01
 Labels:
   App: Web-app
Selector:
   App: Web-app
   Version: v1.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the deployment for Blue Web App:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type: Expansion
Metadata:
  Name: web-app-01
Specification:
  Template:
        Metadata:
           Labels:
             App: Web-app
             Version: "v1.0.0"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we want to redirect traffic to the new (green) version of the app, &lt;/p&gt;

&lt;p&gt;we update the deployment file to point to the new version v2.0.0.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type: Service
Metadata:
 Name: web-app-02
 Labels:
   App: Web-app
Selector:
   App: Web-app
   Version: v2.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expansion for Green App:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type: Expansion
Metadata:
  Name: web-app-02
Specification:
  Template:
        Metadata:
           Labels:
             App: Web-app
             Version: "v2.0.0"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thank you for reading my blog. If you like my work feel free to connect me on &lt;a href="https://www.linkedin.com/in/krishnamohanyerrabilli"&gt; LinkedIn &lt;/a&gt; or &lt;a href="https://www.twitter.com/K_Mohan_"&gt;Twitter&lt;/a&gt;, see you with another one guys.  &lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Kubernetes Networking for beginners (part 1)</title>
      <dc:creator>Krishnamohan Yerrabilli</dc:creator>
      <pubDate>Tue, 27 Sep 2022 02:33:33 +0000</pubDate>
      <link>https://forem.com/krishnamohan_yerrabilli/kubernetes-networking-for-beginners-part-1-283p</link>
      <guid>https://forem.com/krishnamohan_yerrabilli/kubernetes-networking-for-beginners-part-1-283p</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Networking is one of the most important topics in kubernetes and it was was created to run distributed systems over a cluster of machines. Distributed systems make networking a central and necessary component of implementation, because of this it's crusial to understand how kubernetes facilitates communication inside of the cluster and how external traffic interact with k8s eco-system, I'll make you understand how this things possible with 11-indepth diagrams, before we dive in we want to have a good understanding of networking terminologies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic terminologies
&lt;/h3&gt;

&lt;h4&gt;
  
  
  IP address
&lt;/h4&gt;

&lt;p&gt;It is an 4 decimals number separated by periods, for example it's look this &lt;code&gt;142.250.192.132/24&lt;/code&gt;, it is by default whatever device or any other network capable system will be assigned an Ip address from the network provider such as ISP(Internet service provider(jio/airtel/ACT fiber)), the ip is used to find out a particular device in the network either it's a LAN/WAN &lt;/p&gt;

&lt;h4&gt;
  
  
  Port number
&lt;/h4&gt;

&lt;p&gt;Ok we got the information we needed from the internet to the device we are using, but how the device(kernel) knows which application is requesting this particular information, this is were PORT numbers comes into play, there are set of port numbers are designated to each and every application, for example you're google chrome has a different port number, your database has different port number, whatsapp has a different port and so on, and that's how kernel knows what is the right application is requesting this info and sends it, one quick note you maybe heard about sockets, so what are those, its is your ( IP + port number ) called as socket.&lt;/p&gt;

&lt;h4&gt;
  
  
  MAC address
&lt;/h4&gt;

&lt;p&gt;Technically called as Media Access Control its a 12 digit hexa-decimal number, and it is tied to the Network Interface Controller (NIC) and it is a sub component of larger device called as NIC(Network Interface Card) this were you connect the internet from like you plugin a ethernet cable, wifi or any other interface, it is fixed to your physical machine, and it is unique to every device in the world.&lt;/p&gt;

&lt;h4&gt;
  
  
  Router
&lt;/h4&gt;

&lt;p&gt;A router is a mediator between a intranet(inner network) such as organisational network and a outer network such as internet(collection of inter-connected computers), router seats between this two of those &lt;br&gt;
while taking the user request and forward to the appropriate DNS server and get the response back to the client to serve the request   &lt;/p&gt;

&lt;h4&gt;
  
  
  ARP server
&lt;/h4&gt;

&lt;p&gt;Imagine you have 10 devices connected to your network from the help of your router, whenever a packet comes from outer network(WAN) to LAN, how the router knows what's is the appropriate device to send this packet, this is where ARP (Address resoultion protocol ) comes into picture it is a procedure which powers the internet from the early 1980's, it is basically a translator which maps your IP address to MAC address of your machine&lt;/p&gt;

&lt;p&gt;It stores all mac address of its Network such as LAN or you're home network, whenever the router needs MAC address the router makes a request to the ARP server to get the MAC address, and the ARP gives the response back to the router, and then the router knows which device is requesting the information.&lt;/p&gt;

&lt;h4&gt;
  
  
  DNS Server
&lt;/h4&gt;

&lt;p&gt;Computers doesn't understand human languages they only knows numbers, in a high level context Domain name system is a server that maintains all domain address and their IP address, for example domain name is (&lt;a href="http://www.google.com"&gt;www.google.com&lt;/a&gt;) and it's assigned a IP address (142.250.205.228) this two are stored in the DNS server, Whenever a user or a host requsts a service from a domain, this requests forward to DNS so it can find the right IP address which is then the request goes to the right server, try to paste the above ip address in search bar and see the magic &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XuxXJW6V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dusoqsru1xai1ya9k3ew.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XuxXJW6V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dusoqsru1xai1ya9k3ew.jpg" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Kubernetes ReplicaSet</title>
      <dc:creator>Krishnamohan Yerrabilli</dc:creator>
      <pubDate>Sat, 24 Sep 2022 10:09:09 +0000</pubDate>
      <link>https://forem.com/krishnamohan_yerrabilli/kubernetes-replicaset-3eoe</link>
      <guid>https://forem.com/krishnamohan_yerrabilli/kubernetes-replicaset-3eoe</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of contents&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is a Replicaset?&lt;/li&gt;
&lt;li&gt;Which problem it solves?&lt;/li&gt;
&lt;li&gt;What is an object?&lt;/li&gt;
&lt;li&gt;What is a resource?&lt;/li&gt;
&lt;li&gt;The Anatomy of a ReplicaSet Manifest&lt;/li&gt;
&lt;li&gt;How to scale up/down?

&lt;ul&gt;
&lt;li&gt;Scaling down &lt;/li&gt;
&lt;li&gt;Scaling up &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;How to delete replicaset?&lt;/li&gt;
&lt;li&gt;How to delete replicaset without deleting pods&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;😃 In the journey of learning &lt;strong&gt;Kubernetes&lt;/strong&gt; you come up to &lt;strong&gt;Replicasets&lt;/strong&gt;, what does it mean? why we're using it? and where do we use it? I'll try to clear some of the doubts that come up to you as a newbie, Let's see what it is all about, and what's the role it plays inthe world of &lt;strong&gt;Kubernetes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tbPQAdLl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3iysuwnqb9a8b8wksdsa.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tbPQAdLl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3iysuwnqb9a8b8wksdsa.gif" alt="Image description" width="220" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Replicaset simply means, it replicates pods, like you can have an n number of pods,1 replica means it controls one pod, under the hood of a replicaset there is a central important concept called labels, let's see in detail what it is all about and explore what exactly replicaset means, and its use cases...&lt;/p&gt;

&lt;h3&gt;
  
  
  which problem it solves?
&lt;/h3&gt;

&lt;p&gt;It automatically replicates and it makes sure a certain number of pods run all the time as you mentioned in your manifest file.&lt;/p&gt;

&lt;p&gt;Before we dive in we want to understand some terms&lt;/p&gt;

&lt;h4&gt;
  
  
  What is an object?
&lt;/h4&gt;

&lt;p&gt;simply an object is a design model only we use for a specific purpose there are many objects in Kubernetes&lt;/p&gt;

&lt;h4&gt;
  
  
  What is a resource?
&lt;/h4&gt;

&lt;p&gt;In simple terms, a resource is a collection of objects for that specific resource&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;(pod) -&amp;gt; this is an object&lt;/li&gt;
&lt;li&gt;(pods) -&amp;gt; this is an endpoint, in this case, it stores the collection of pods&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's see what are the different resources available, there is a command for this&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                              SHORTNAMES   APIVERSION                             NAMESPACED   KIND
bindings                                       v1                                     true         Binding
componentstatuses                 cs           v1                                     false        ComponentStatus
configmaps                        cm           v1                                     true         ConfigMap
endpoints                         ep           v1                                     true         Endpoints
events                            ev           v1                                     true         Event
limitranges                       limits       v1                                     true         LimitRange
namespaces                        ns           v1                                     false        Namespace
nodes                             no           v1                                     false        Node
persistentvolumeclaims            pvc          v1                                     true         PersistentVolumeClaim
persistentvolumes                 pv           v1                                     false        PersistentVolume
pods                              po           v1                                     true         Pod
podtemplates                                   v1                                     true         PodTemplate
replicationcontrollers            rc           v1                                     true         ReplicationController
resourcequotas                    quota        v1                                     true         ResourceQuota
secrets                                        v1                                     true         Secret
serviceaccounts                   sa           v1                                     true         ServiceAccount
services                          svc          v1                                     true         Service
mutatingwebhookconfigurations                  admissionregistration.k8s.io/v1        false        MutatingWebhookConfiguration
validatingwebhookconfigurations                admissionregistration.k8s.io/v1        false        ValidatingWebhookConfiguration
customresourcedefinitions         crd,crds     apiextensions.k8s.io/v1                false        CustomResourceDefinition
apiservices                                    apiregistration.k8s.io/v1              false        APIService
controllerrevisions                            apps/v1                                true         ControllerRevision
daemonsets                        ds           apps/v1                                true         DaemonSet
deployments                       deploy       apps/v1                                true         Deployment
replicasets                       rs           apps/v1                                true         ReplicaSet
statefulsets                      sts          apps/v1                                true         StatefulSet
tokenreviews                                   authentication.k8s.io/v1               false        TokenReview
localsubjectaccessreviews                      authorization.k8s.io/v1                true         LocalSubjectAccessReview
selfsubjectaccessreviews                       authorization.k8s.io/v1                false        SelfSubjectAccessReview
selfsubjectrulesreviews                        authorization.k8s.io/v1                false        SelfSubjectRulesReview
subjectaccessreviews                           authorization.k8s.io/v1                false        SubjectAccessReview
horizontalpodautoscalers          hpa          autoscaling/v2                         true         HorizontalPodAutoscaler
cronjobs                          cj           batch/v1                               true         CronJob
jobs                                           batch/v1                               true         Job
certificatesigningrequests        csr          certificates.k8s.io/v1                 false        CertificateSigningRequest
leases                                         coordination.k8s.io/v1                 true         Lease
bgpconfigurations                              crd.projectcalico.org/v1               false        BGPConfiguration
bgppeers                                       crd.projectcalico.org/v1               false        BGPPeer
blockaffinities                                crd.projectcalico.org/v1               false        BlockAffinity
caliconodestatuses                             crd.projectcalico.org/v1               false        CalicoNodeStatus
clusterinformations                            crd.projectcalico.org/v1               false        ClusterInformation
felixconfigurations                            

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

&lt;/div&gt;



&lt;p&gt;These are some of the resources and types of objects you can see&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now let's understand the replica set with an example
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: frontend
  labels:
    app: guestbook
    tier: frontend
spec:
  # modify replicas according to your case
  replicas: 4
  selector:
    matchLabels:
      tier: frontend
  template:
    metadata:
      labels:
        tier: frontend  
    spec:
      containers:
      - name: php-redis
        image: gcr.io/google_samples/gb-frontend:v3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Anatomy of a ReplicaSet Manifest
&lt;/h3&gt;

&lt;p&gt;Let's understand what is going inside (step by step)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: frontend
  labels:
    app: guestbook
    tier: frontend

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

&lt;/div&gt;



&lt;p&gt;There are some resources you want to mention always in you're manifest file such as &lt;code&gt;apiVersion&lt;/code&gt;, &lt;code&gt;kind&lt;/code&gt;, &lt;code&gt;metadata&lt;/code&gt;, &lt;code&gt;spec&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;apiVersion&lt;/code&gt;: this simply means which API version you're using to create the object&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kind&lt;/code&gt;: This just means, what kind of object you're creating, in this case, it is Replicaset &lt;/p&gt;

&lt;p&gt;plz note: what you're providing as an object, that is the desired state and that is what you're workload is going to be&lt;/p&gt;

&lt;p&gt;&lt;code&gt;metadata&lt;/code&gt;: this is a piece of additional information to identify you're workload, in this case, your workload is a replica set&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;metadata.name(name: frontend) -&amp;gt; you object name in the cluster&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;metadata.labels(labels app: guestbook tier: frontend) -&amp;gt; this is like a tag to the replicaset we can see details of the replicaset by using those labels&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;labels are most important in Replicaset more info coming below&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;spec:
  # modify replicas according to your case
  replicas: 4
  selector:
    matchLabels:
      tier: frontend
  template:
    metadata:
      labels:
        tier: frontend
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;spec&lt;/code&gt;: refers to specs of replicaset&lt;/p&gt;

&lt;p&gt;&lt;code&gt;replicas&lt;/code&gt;: how many pods(Instances) want to be created by the replica set&lt;/p&gt;

&lt;p&gt;&lt;code&gt;selector&lt;/code&gt;: here selector is the thing, the replicaset takes it, and checks the same label to identify what are the pods it wants to control.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;you want to make sure (selector.matchLabels.tier: frontend)-&amp;gt; this tier: frontend &lt;br&gt;
taken as a reference by replicaset to check the pod == (template.metadata.labels.tier: frontend)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;-&amp;gt; this tag is attached to each pod, this just wants to be the same, then only rs knows what&lt;br&gt;
 are the pods it wants to checkout.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;template&lt;/code&gt;: above we mentioned 4 replicas which means the same number of pods are created by the replica set, when pods are made this is taken as reference by the replica set to create new pods &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;don't think replicaset means just creating replicas, that's not the main view, it replicates or re-create pods if anyone one of them dies, but how replicaset is identifying its designated pods&lt;/p&gt;

&lt;p&gt;just by &lt;strong&gt;matching the &lt;code&gt;selector.tier tag to the template.tier tag&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  How to scale up/down?
&lt;/h3&gt;

&lt;p&gt;There are 2 ways to scale up or scale down the pods, one is modifying the manifest another is just by giving a command:&lt;/p&gt;

&lt;h4&gt;
  
  
  Scaling down this is how you do it
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get rs
NAME       DESIRED   CURRENT   READY   AGE
frontend   4         4         4       19s
$ kubectl scale --replicas=2 rs frontend
replicaset.apps/frontend scaled
$ kubectl get rs
NAME       DESIRED   CURRENT   READY   AGE
frontend   2         2         2       23s

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

&lt;/div&gt;



&lt;h4&gt;
  
  
  Scaling up this is how you do it
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get rs
NAME       DESIRED   CURRENT   READY   AGE
frontend   2         2         0       32s
$ kubectl scale --replicas=6 rs frontend
replicaset.apps/frontend scaled
$ kubectl get rs
NAME       DESIRED   CURRENT   READY   AGE
frontend   6         6         6       45s

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Removing replicaset from the cluster
&lt;/h3&gt;

&lt;h4&gt;
  
  
  How to delete replicaset?
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl delete rs frontend
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  How to delete replicaset without deleting pods?
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl delete rs frontend --cascade=orphan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope you find this helpful for your journey, Thank you for reading my blog. If you like my work feel free to connect on &lt;a href="https://www.linkedin.com/in/krishnamohanyerrabilli"&gt; LinkedIn &lt;/a&gt; or &lt;a href="https://www.twitter.com/K_Mohan_"&gt;Twitter&lt;/a&gt;, see you with another one guys. 😀 &lt;/p&gt;



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

&lt;/div&gt;

</description>
      <category>kubernetes</category>
      <category>cloud</category>
      <category>containerapps</category>
      <category>devops</category>
    </item>
    <item>
      <title>An overview of kubernetes pods</title>
      <dc:creator>Krishnamohan Yerrabilli</dc:creator>
      <pubDate>Thu, 22 Sep 2022 06:22:21 +0000</pubDate>
      <link>https://forem.com/krishnamohan_yerrabilli/an-overview-of-kubernetes-pods-5684</link>
      <guid>https://forem.com/krishnamohan_yerrabilli/an-overview-of-kubernetes-pods-5684</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lUAF9ExR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3axweeif90n6rtn8vjcp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lUAF9ExR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3axweeif90n6rtn8vjcp.gif" alt="Image description" width="432" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  what is a pod?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A pod is like a smallest cookie_box in the kubernetes world &lt;/li&gt;
&lt;li&gt;&lt;p&gt;A container is like a cookie which is stored inside the cookie_box(pod)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is the foundational concept in the k8's all other objects(cookie_box) models are based on the pod&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  what is pod deployment?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;when we intially setup a pod, we give this specifications from a file called (manifest(a set of desired state which is wanted by the user))   &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step1: file handed from kubectl API to the Masternode(control plane) API server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step2: file stored to etcd&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step3: schedular find nodes which are this pods suitable to fit in&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step4: schedular assign a pod to the node&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step5: the status of schedular assigned node will give back to the (Master node)API server from the schedular&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step6: now kubectl hand the instructions to over to the CRI(container runtime interface) &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step7: image is pulled from the registry(OCI image spec) only if OCI req fulfilled&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step8: this transportaion of image will from the registry has also a OCI called (Open Container Intiative&lt;br&gt;
distribution spec) &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step9: the pod is hosted inside worker node which holds (runtime+pod+container)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step10: now runc(main runtime (OCI runtime spec)) holds 2 things one is image repo(collection of image &lt;br&gt;
layers) and second one is directory, which holds the image&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;step 11: after a clone() system call has been performed by the runc that forward to the linux kernel&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;kernel creates all new_name_spaces(they are 7 of them still counting) to form an individual isolated container(don't confuse with docker containers) all this container engines like (rkt,docker,crio) they just perform operations required to forward the manifest spec and other details to the kernel, real containers are created by only, only from linux&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is just an overview of the whole container creation process, as you go forward I will state each detail on &lt;br&gt;
what's happening internally&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Multi container
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A pod consists can consists of many contianers, if we do that then we're violating one process(container) 
for one pod, but we want to use in some cases like (what if we want to store logs, the second (helper)container is 
responsible to perform file synchronization, logging, and watcher capabilities and it also called as sidecar), we 
can deploy two containers from the manifest file&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pod Networking
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pod networking is happens, where when two pods want to talk to each other, this done by pod Networking, 
this is performed by individual pod IP, the pod networking takes place using this IP(back&amp;amp;forth) communication 
takes place &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  intra-pod networking
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;intially when pod was created the first container in the pod is called as pause container(which holds the &lt;br&gt;
cluster IP) for expose traffic to outside world &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When helper container and main container want to talk to each other they use IPC(inter process communication&lt;br&gt;
(name space) by through a message Queue) each containers communicate locally, they share same IP from the pod IP but &lt;br&gt;
with different ports&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  pod-lifecycle
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;as all objects on this earth has lifecycle, pod also has a lifecyle, If we see this from high level POV &lt;br&gt;
it has 3 stages&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;pending, running, succeesful&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;there also we have a stage called falied, when pod was at (pending, running) it has a chance it may also &lt;br&gt;
fails to create pod because of the invalid format, invalid image, maybe it doesn't full filling CRI runtime spec, and other reasons...&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kubernetes</category>
      <category>opensource</category>
      <category>cloudnative</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
