<?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: Vikas Tiwari</title>
    <description>The latest articles on Forem by Vikas Tiwari (@vikkastiwari).</description>
    <link>https://forem.com/vikkastiwari</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%2F585924%2Fa1eba454-466c-4cc9-b076-6a7b89259591.png</url>
      <title>Forem: Vikas Tiwari</title>
      <link>https://forem.com/vikkastiwari</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vikkastiwari"/>
    <language>en</language>
    <item>
      <title>MongoDB: A Beginner’s Guide</title>
      <dc:creator>Vikas Tiwari</dc:creator>
      <pubDate>Wed, 07 Apr 2021 17:02:52 +0000</pubDate>
      <link>https://forem.com/vikkastiwari/mongodb-a-beginner-s-guide-4o8l</link>
      <guid>https://forem.com/vikkastiwari/mongodb-a-beginner-s-guide-4o8l</guid>
      <description>&lt;h3&gt;
  
  
  Overview
&lt;/h3&gt;

&lt;p&gt;MongoDB is the most popular NoSQL database and is an open-source document-oriented database. The term ‘NoSQL’ means non-relational. MongoDB doesn't follow the table-like relational database structure rather MongoDB provides us the different mechanisms for storage and retrieval of data.&lt;br&gt;
Format: BSON ( similar to JSON format)&lt;/p&gt;

&lt;p&gt;MongoDB Atlas provides an easy way to host and manage your data in the cloud. This tutorial guides you through creating an Atlas cluster, set up the environment, connecting to it, and importing data in CSV format.&lt;/p&gt;
&lt;h3&gt;
  
  
  1 - Example of Document Model in MongoDB [Just take a look]&lt;img src="https://media.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%2F8aboduguw571onv2mtfw.JPG" alt="Alt Text"&gt;
&lt;/h3&gt;
&lt;h3&gt;
  
  
  2 - Creating an Atlas Free-Tier Cluster
&lt;/h3&gt;

&lt;p&gt;step 1 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Signup on &lt;a href="https://www.mongodb.com/cloud/atlas" rel="noopener noreferrer"&gt;https://www.mongodb.com/cloud/atlas&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Sign in, select the free pack, and select version 4.4 - give project name and cluster name (Note: Cluster name cannot be changed once deployed) respectively.
(ps: wait for a min while the server is setting up)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;step 2 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a new database user as shown below { select MongoDB Roles as atlasAdmin@admin }
&lt;img src="https://media.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%2Ft7rziyabg12ckwdo9zd8.JPG" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;step 3 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;goto NETWORK ACCESS &amp;gt; select ADD IP ADDRESS &amp;gt; select ALLOW ACCESS FROM ANYWHERE &amp;gt; CONFIRM (without doing any changes) 
&lt;img src="https://media.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%2Fx7m9q6gffsc6avpgm4f2.JPG" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For reference:&lt;br&gt;
My project name = analytics&lt;br&gt;
My cluster name = mflix&lt;br&gt;
My collection name = movies&lt;/p&gt;
&lt;h3&gt;
  
  
  3 - Installing mongoDB
&lt;/h3&gt;

&lt;p&gt;step 1 - Download Enterprise version -&lt;a href="https://www.mongodb.com/try/download/enterprise" rel="noopener noreferrer"&gt;Download&lt;/a&gt;&lt;a href="https://media.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%2Fq7h0xcgot4wfonxnxj3m.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fq7h0xcgot4wfonxnxj3m.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Note&lt;/strong&gt;: As we are downloading MongoDB version 4.4.0 it has database tools explicitly.&lt;/p&gt;

&lt;p&gt;step 2 - we have to download it from &lt;a href="https://www.mongodb.com/try/download/database-tools?tck=docs_databasetools" rel="noopener noreferrer"&gt;Download Tools&lt;/a&gt;&lt;a href="https://media.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%2Fohg3xb813hcxn6f5wbqo.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fohg3xb813hcxn6f5wbqo.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once Installed you will see the interface in the MongoDB folder as shown below -&lt;a href="https://media.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%2F46c0la79ru1z8906uhxz.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F46c0la79ru1z8906uhxz.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;step 3 - &lt;br&gt;
1) goto  C:\Program Files\MongoDB\Server\4.4\bin  and copy the path&lt;a href="https://media.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%2Fvx871vk4pwyiuuamd1u5.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fvx871vk4pwyiuuamd1u5.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) Open  Control Panel\All Control Panel Items\System on your computer&lt;a href="https://media.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%2F3xyl5kw7fwkxb21sb852.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F3xyl5kw7fwkxb21sb852.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) goto Advanced system settings &amp;gt; select Advanced tab &amp;gt; select Environment Variables&lt;a href="https://media.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%2F471x14jb5mow5ndv9c41.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F471x14jb5mow5ndv9c41.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) Under system variables &amp;gt; select path &amp;gt; New &amp;gt; add C:\Program Files\MongoDB\Server\4.4\bin to path [Note : give it highest priority]&lt;a href="https://media.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%2Fsq3h8mkzpz13zfjv12a3.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fsq3h8mkzpz13zfjv12a3.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5) Repeat same for Tools and add it to environment variables C:\Program Files\MongoDB\Tools\100\bin &lt;a href="https://media.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%2F1xiymcfy49j9m69j3jec.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F1xiymcfy49j9m69j3jec.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;step 4 - create data folder in C drive and in data folder create one db folder - C:\data\db &lt;a href="https://media.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%2F2wi1f2rmpbq0xpcg11on.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F2wi1f2rmpbq0xpcg11on.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you are done with the above things&lt;br&gt;
step 5 -&lt;br&gt;
1) open command prompt and execute mongod.exe [keep that command prompt window as it is and open new command prompt window]&lt;a href="https://media.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%2Fxtvn70bekcqp2qr54wj1.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fxtvn70bekcqp2qr54wj1.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To open new command prompt click - [Windows + R ] and write cmd &amp;gt; enter  &lt;img src="https://media.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%2Fyhd32ie4x1qkdbw5s3eh.JPG" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2) In that new command prompt execute mongo.exe&lt;a href="https://media.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%2Fk43diqwaq9j9o2tvqhrb.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fk43diqwaq9j9o2tvqhrb.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hurray,🙌 we are all set and now we can run mongoimport.exe and mongoexport.exe to play with the data !!&lt;/p&gt;
&lt;h3&gt;
  
  
  4 - Importing Data
&lt;/h3&gt;

&lt;p&gt;step 1 - Download dummy data from &lt;a href="https://sample-videos.com/download-sample-csv.php" rel="noopener noreferrer"&gt;https://sample-videos.com/download-sample-csv.php&lt;/a&gt; or use your own data with .csv extension. &lt;/p&gt;

&lt;p&gt;step 2 - Connect cluster to MongoDB compass&lt;br&gt;
1) Sign in - &lt;a href="https://account.mongodb.com/account/login" rel="noopener noreferrer"&gt;https://account.mongodb.com/account/login&lt;/a&gt; and open Clusters under DATA STORAGE as shown below&lt;a href="https://media.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%2F1ltnxjb9sqcvpftqq3z9.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F1ltnxjb9sqcvpftqq3z9.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) Click on connect &amp;gt; select Connect using MongoDB Compass &amp;gt;  copy the string &lt;a href="https://media.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%2Fvx3z3w2nmdkwnnui3dwi.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fvx3z3w2nmdkwnnui3dwi.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) Download MongoDB compass - &lt;a href="https://www.mongodb.com/try/download/compass" rel="noopener noreferrer"&gt;https://www.mongodb.com/try/download/compass&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.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%2Ff5ifzwj4mtcqmsez86sm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ff5ifzwj4mtcqmsez86sm.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) Open your MongoDB compass and paste the string in the section and replace  with your respective password which you kept while creating Database User &amp;gt; click on CONNECT.&lt;a href="https://media.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%2Fmkmr26z8bea1if82zp2x.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fmkmr26z8bea1if82zp2x.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;step 3 - goto clusters under DATA STORAGE and click on 3 dots beside collections &amp;gt; select command-line tools &amp;gt; under DATA IMPORT AND EXPORT TOOLS  - copy the URI string under mongoimport&lt;a href="https://media.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%2Fc14b4nvh25aget1zniju.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fc14b4nvh25aget1zniju.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;step 4 - &lt;br&gt;
1) open the command prompt with the path where your data resides (where you downloaded the dummy CSV file) and paste the copied string.&lt;br&gt;
2) change password, database name, and collection name[Note: At the first time of creation you can give any name you want, to database and collection] respectively.&lt;br&gt;
3) put   as csv and  as yourfilename.csv and then add --headerline in that string .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: When exporting or importing CSV data, an additional --fields flag is often required. Therefore, we are adding --headerline to the string&lt;/p&gt;

&lt;p&gt;&lt;em&gt;so your final string will look like&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;mongoimport --uri mongodb+srv://&amp;lt;Here your project name will come bydefault&amp;gt;:&amp;lt;Enter your password&amp;gt;@mflix.3zfhn.mongodb.net/&amp;lt;Enter your database name&amp;gt; --collection &amp;lt;Enter your collection name&amp;gt; --type csv --headerline --file yourfilename.csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now hit the enter and your data will get imported which you can check in MongoDB compass as well on Atlas.&lt;a href="https://media.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%2Fcqq0fjsnh73780878c0o.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fcqq0fjsnh73780878c0o.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrapping up
&lt;/h3&gt;

&lt;p&gt;So, we have discussed how to download the required tools &amp;amp; set up the environment to import the data and access the same in MongoDB Compass or Atlas.&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this article…Thanks for reading!&lt;/p&gt;

&lt;p&gt;If you have any queries regarding this tutorial, feel free to leave comments in the discussion section below or contact me on &lt;a href="https://www.linkedin.com/in/vikas-tiwari-1b051818b/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;See you guys in the next article! ❤️ ✌🏼&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>cloud</category>
      <category>database</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Getting Started With Kubernetes</title>
      <dc:creator>Vikas Tiwari</dc:creator>
      <pubDate>Fri, 05 Mar 2021 14:09:10 +0000</pubDate>
      <link>https://forem.com/vikkastiwari/getting-started-with-kubernetes-2dpp</link>
      <guid>https://forem.com/vikkastiwari/getting-started-with-kubernetes-2dpp</guid>
      <description>&lt;p&gt;Kubernetes has now become the de facto standard for deploying containerized applications at scale in private, public, and hybrid cloud environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  okay, but wait what is Kubernetes?
&lt;/h3&gt;

&lt;p&gt;Kubernetes is a container orchestration system that was open-sourced by Google in 2014. It is a portable, extensible platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available. &lt;/p&gt;

&lt;h3&gt;
  
  
  Now, what does container actually mean?
&lt;/h3&gt;

&lt;p&gt;In simple terms, a container is a place that holds all the required ingredients to run the respective application. In the end, it can be shipped to run in any environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fj8hxj2jn6iw6k97ckv3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fj8hxj2jn6iw6k97ckv3x.png" alt="Alt Text"&gt;&lt;/a&gt;The largest public cloud platforms AWS, Google Cloud, Azure, IBM Cloud, and Oracle Cloud now provide managed services for Kubernetes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why use Kubernetes?
&lt;/h3&gt;

&lt;p&gt;In layman's terms, Kubernetes acts like a manager who is responsible for taking care of all the workers(containers).&lt;/p&gt;

&lt;p&gt;Now let's see it in technical terms, When we run our production environments using a microservice pattern with many containers, we need to take care of many things. Such as health check, version control, scaling, and rollback mechanism. Kubernetes provides a container-orchestration engine that is used to automate deploying, scaling, and managing containerized applications on a group of servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kubernetes Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.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%2F7uzebevxhaq8qmeqln7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F7uzebevxhaq8qmeqln7b.png" alt="Alt Text"&gt;&lt;/a&gt;As you can see in the above diagram, there is a lot of gibberish terms that you don’t understand. Let's understand it one by one.&lt;/p&gt;

&lt;p&gt;Kubernetes follows the master-slave architecture. Where master is master node and slaves are worker nodes.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Kubernetes Architecture&lt;/em&gt; consists of
&lt;/h3&gt;

&lt;p&gt;1) Master Node - It manages the other worker nodes e.g node1 and node2&lt;/p&gt;

&lt;p&gt;2) Worker Nodes - Generally, Worker nodes are virtual machines / physical servers running within a data center. It makes available the underlying network and storage for the application to use.&lt;/p&gt;

&lt;p&gt;3) Kubernetes cluster - After deployment of Kubernetes, you get a cluster. It is a set of node machines called worker nodes for running containerized applications. where every cluster consists of at least one worker node. If you’re running Kubernetes, you’re running a cluster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kubernetes Components
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Master Node
&lt;/h3&gt;

&lt;p&gt;Master Node is responsible for making decisions about what tasks/operations have to be performed. It monitors everything if something unusual is found then it takes necessary actions respectively to rectify it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Components of the Master Node
&lt;/h3&gt;

&lt;h4&gt;
  
  
  kube-apiserver:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The API server validates and configures data for the API objects which include pods, services, replication controllers, and others. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The layer exposes the API and interfaces to define, deploy, and manage the lifecycle of containers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The main implementation of a Kubernetes API server is &lt;a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/" rel="noopener noreferrer"&gt;kube-apiserver&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  etcd:
&lt;/h4&gt;

&lt;p&gt;Kubernetes makes use of “Etcd” to store configuration data of the cluster and to represent the overall state of the cluster anytime. It is a Consistent and highly-available key-value store and the only source on which several entities are dependent to configure the state.&lt;/p&gt;

&lt;h4&gt;
  
  
  kube-scheduler:
&lt;/h4&gt;

&lt;p&gt;It selects the node for newly created pods. Where Control plane component keeps watching for newly created Pods with no assigned node.&lt;/p&gt;

&lt;h4&gt;
  
  
  kube-controller-manager:
&lt;/h4&gt;

&lt;p&gt;The component on the master who runs the controllers includes 4 controllers behind the scenes.&lt;br&gt;
1-Node Controller&lt;br&gt;
2-Replication Controller&lt;br&gt;
3-Endpoint Controller&lt;br&gt;
4-Service Accountant Token Controller&lt;br&gt;
It runs the controller processes in the background to regulate the shared state of the cluster and perform a routine task. When there is any change in the service, the controller spots the change and ensures that nodes are up, running, and healthy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Worker Nodes
&lt;/h3&gt;

&lt;p&gt;Worker Nodes are slaves who perform the requested, assigned tasks. And they are controlled by Master Node. In simple terms, it is VM or physical server where containers are deployed. This is also known as a Minion node, and it contains the information to manage networking between containers such as Docker.&lt;/p&gt;

&lt;h3&gt;
  
  
  Components of the Worker Node
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Kubelet:
&lt;/h4&gt;

&lt;p&gt;An agent that runs on each node in the cluster and monitors that containers in a Pod are running and healthy. If not, a replication controller observes this change and launches Pods on another healthy Pod.&lt;/p&gt;

&lt;h4&gt;
  
  
  Containers:
&lt;/h4&gt;

&lt;p&gt;The container runtime environment is responsible for managing containers, image pulling, stopping the containers, starting the containers, destroying the containers, and more. Which is placed inside the pod and needs an external IP address to view the outside process. Kubernetes supports several container runtimes: Docker, containerd, CRI-O, etc.&lt;br&gt;
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md" rel="noopener noreferrer"&gt;More about Kubernetes Container Runtime Interface&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Kube-Proxy:
&lt;/h4&gt;

&lt;p&gt;Kube-proxy is a network proxy and a load balancer that runs on each node in your cluster. Kube-proxy maintains network rules on nodes which allows network communication to your pods where the services are exposed to the outside world. &lt;/p&gt;

&lt;h4&gt;
  
  
  Pods:
&lt;/h4&gt;

&lt;p&gt;The way we use several virtual machines in our system. Similarly, Kubernetes Pod acts as our system which runs several containers within it. Here we can run dependent containers as well where the pod acts as a wrapper. Pods abstract the network and storage away from the underlying containers. With the help of pods, we can maintain our containers. This is a place where your app is running.&lt;/p&gt;

&lt;p&gt;Okay Okay, I know a whole lot of theory is covered till now. But you made it through, Congratulations🎉! &lt;/p&gt;

&lt;p&gt;In the upcoming blog, we will get our hands dirty and start with Kubernetes commands that will help you improvise your learnings. Till then follow up the &lt;a href="https://kubernetes.io/docs/tasks/tools/" rel="noopener noreferrer"&gt;Installation Guide&lt;/a&gt; and explore the tools available. Use/Install the tools supported by the Kubernetes community.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Reach me out on the following links:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.linkedin.com/in/vikas-tiwari-1b051818b/" rel="noopener noreferrer"&gt;LINKEDIN😀&lt;/a&gt;&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://www.youtube.com/channel/UCI_xIqMJa1Oirfjx5-ykylA" rel="noopener noreferrer"&gt;YOUTUBE🚀&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>docker</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
