<?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>DEV Community: Shubham Yadav</title>
    <description>The latest articles on DEV Community by Shubham Yadav (@shubhamyadav).</description>
    <link>https://dev.to/shubhamyadav</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%2F561941%2Fddd2513b-a63d-4f50-8347-7db4642ddbeb.jpeg</url>
      <title>DEV Community: Shubham Yadav</title>
      <link>https://dev.to/shubhamyadav</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shubhamyadav"/>
    <language>en</language>
    <item>
      <title>microservice and monolithic architectures.</title>
      <dc:creator>Shubham Yadav</dc:creator>
      <pubDate>Fri, 25 Nov 2022 15:48:05 +0000</pubDate>
      <link>https://dev.to/shubhamyadav/microservice-and-monolithic-architectures-31</link>
      <guid>https://dev.to/shubhamyadav/microservice-and-monolithic-architectures-31</guid>
      <description>&lt;p&gt;Before microservices, let's see what a monolithic architecture is.&lt;/p&gt;

&lt;p&gt;A monolithic architecture is like a huge container within which all software components of an application are assembled, and all the components share a same database.&lt;/p&gt;

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

&lt;h4&gt;
  
  
  👍 advantages of monolithic architecture:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;easy deployment.&lt;/li&gt;
&lt;li&gt;easier to develop.&lt;/li&gt;
&lt;li&gt;end to end testing can be performed faster.&lt;/li&gt;
&lt;li&gt;easy debugging.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  👎 Disadvantages of monolithic architecture:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Scalability: Individual components cannot be scaled.&lt;/li&gt;
&lt;li&gt;Reliability: if one feature goes down, the entire system goes down&lt;/li&gt;
&lt;li&gt;Adoption of technology is restricted.&lt;/li&gt;
&lt;li&gt;Lack of flexibility.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🚀 Microservice architecture
&lt;/h2&gt;

&lt;p&gt;A microservices architecture is an architectural solution that is based on a collection of independently deployable services. These services have their own business logic and database, and they serve a specialised purpose.&lt;/p&gt;

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

&lt;h4&gt;
  
  
  👍 Advantages of Microservices
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Flexible scaling&lt;/li&gt;
&lt;li&gt;Continuous deployment: frequent and faster release cycles.&lt;/li&gt;
&lt;li&gt;Highly maintainable and testable.&lt;/li&gt;
&lt;li&gt;Independently deployable.&lt;/li&gt;
&lt;li&gt;High reliability: one failure does not bring down the entire application.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  👎 Disadvantages of Microservices
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Difficult to manage a large number of services.&lt;/li&gt;
&lt;li&gt;Each microservice has its own set of logs, making debugging more difficult.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Components of Microservices Architecture:
&lt;/h3&gt;

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

&lt;p&gt;🔵 Identity Provider:  These client requests are subsequently forwarded to identity providers, who authenticate the requests and relay them to API Gateway. The queries are subsequently routed to internal services using a well-defined API Gateway.&lt;/p&gt;

&lt;p&gt;🔵 Static Content. Following internal communication, the Microservices distribute static material to a cloud-based storage service that may provide it directly to clients via Content Delivery Networks (CDNs).&lt;/p&gt;

&lt;p&gt;🔵 Management: This component is responsible for balancing the services on nodes and identifying failures.&lt;/p&gt;

&lt;p&gt;🔵 Service Discovery: it keeps a list of services on which nodes are situated, it acts as a guide for Microservices to discover the path of communication between them.&lt;/p&gt;

&lt;h4&gt;
  
  
  Follow me on &lt;a href="https://twitter.com/shubhztwt"&gt;twitter&lt;/a&gt;
&lt;/h4&gt;

</description>
    </item>
    <item>
      <title>JWT (JSON Web Token)</title>
      <dc:creator>Shubham Yadav</dc:creator>
      <pubDate>Tue, 16 Aug 2022 19:07:00 +0000</pubDate>
      <link>https://dev.to/shubhamyadav/jwt-json-web-token-1j19</link>
      <guid>https://dev.to/shubhamyadav/jwt-json-web-token-1j19</guid>
      <description>&lt;h1&gt;
  
  
  What JWT is used for?
&lt;/h1&gt;

&lt;p&gt;A JWT is used for authorisation, authorisation is making sure that the user that sends a request to your server is the same user that actually logged in during the authentication process.&lt;br&gt;
it's authorizing that a user is an access to this particular system and the way is usually done is by using session.&lt;/p&gt;

&lt;p&gt;for example, you have a session ID that you send down in the cookies of the browser and every time the client makes a request they send that session ID up to the server and the server checks its memory that what the user has that session ID it finds that user and it does the authorisation to make sure the user has access.&lt;/p&gt;

&lt;p&gt;In JWT instead of cookies, it uses a JSON web token which is what it stands for.&lt;/p&gt;

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

&lt;p&gt;first, we're gonna take look at the traditional user login system that uses sessions and cookies to store the user. so the first that happens is the user actually logs in from the client by posting their email and password for example as soon as it gets to the server, the server is going to the authentication to make sure that the user is correct with the email and password it stores that user inside the session which stored in the memory of the server and it gets a unique ID and it sends the ID back to the browser using a cookie so that the browser always has that session ID that it sends up to the server every time It makes a request.&lt;br&gt;
for example, the client makes another request that the session ID gets sent along with the cookie and the server makes the calculations and checks the session memory and checks based on the ID it verifies the user and sends the response back to the browser.&lt;/p&gt;

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

&lt;p&gt;The other form of authentication is JWT it works very similarly in the beginning, we make a POST request with email and password to the server just like before but instead of storing information on the server inside the session memory what happens is that the server creates a JSON Web Token (JWT) and it signs it with its own secret key so the server knows if you change it then it's invalid it can check that with its secret key.&lt;/p&gt;

&lt;p&gt;The main difference here is nothing is stored on the server, the server doesn't store the user, this JWT has all the information about the user built into it. so the server sends JWT back down to the browser and it can choose to store that. for example, it can do cookie storage and it works similarly.&lt;/p&gt;

&lt;p&gt;Know the client sends a request to the server and it includes  JSON Web Token so it knows what user s authenticating with it and the server checks the token with its own secret key and it verifies that this web token has not been changed. If the client changed the JSON Web Token and changed the user information then it can say it's invalid but if nothing is changed with JWT and the user is authorized to use that resource it sends the response back to the client.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why use JWT?
&lt;/h2&gt;

&lt;p&gt;Now that we talked about how JWT works, and what it is now let's see why would you want to use JWT.&lt;br&gt;
let's take a look at a very simple one of the common use cases of JWT.&lt;/p&gt;

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

&lt;p&gt;Here we have two different serves, we have a bank that owns a server that runs all their banking applications and their banking website and all the baking information, but they also own a separate server and this takes care of all the retirement plans they allow people to invest and do retirement plans on a completely separate web application, but they want their users that login into the bank to also be able to automatically log into their retirement account, so the switch from bank to retirement server they don't want their user to log back in so that it makes it seamless and looks like they are on the same application. This is very common in large-scale industries &lt;/p&gt;

&lt;p&gt;What happens is that when you use a normal session-based server your session is stored in the bank server and not inside the retirement server so the users need to log back in because they need to have their session stored in the retirement server because the session ID from the client is not found in the retirement server.&lt;/p&gt;

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

&lt;p&gt;But when you use JWT you share the same secret key between the bank and the retirement server and all you need to do is send the same JWT from the client to both of them and you'll be authenticated both times without having to re-log back in.&lt;/p&gt;

&lt;p&gt;SO the important thing about JWT is, no matter how many different servers you have no matter how many different applications, or load balancers you have it doesn't matter, the user can authenticate  with any of those servers as long has the same secret key between them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.post('/api/login', async (req, res) =&amp;gt; {
    const { username, password } = req.body
    const user = await User.findOne({ username }).lean()

    if (!user) {
        return res.json({ status: 'error', error: 'Invalid username/password' })
    }

    if (await bcrypt.compare(password, user.password)) {

        const token = jwt.sign(
            {
                id: user._id,
                username: user.username
            },
            JWT_SECRET
        )

        return res.json({ status: 'ok', data: token })
    }

    res.json({ status: 'error', error: 'Invalid username/password' })
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;above is an example of how you can use JWT for logging a user in the application using a post request in nodejs.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>jwt</category>
      <category>node</category>
    </item>
    <item>
      <title>Kubernetes Overview</title>
      <dc:creator>Shubham Yadav</dc:creator>
      <pubDate>Wed, 08 Jun 2022 21:15:00 +0000</pubDate>
      <link>https://dev.to/shubhamyadav/kubernetes-overview-44k</link>
      <guid>https://dev.to/shubhamyadav/kubernetes-overview-44k</guid>
      <description>&lt;h1&gt;
  
  
  kubernetes
&lt;/h1&gt;

&lt;p&gt;Kubernetes is a container orchestration tool, developed by Google in 2014. in simple terms, it manages containers from docker containers or from other technology.&lt;/p&gt;

&lt;p&gt;Kubernetes basically helps you manage containerized applications made up of hundreds or maybe thousands of containers in different environments like physical, virtual, or cloud environments.&lt;/p&gt;

&lt;p&gt;If you are not familiar with containers, check out my &lt;a href="https://dev.to/shubhamyadav/docker-made-easy-1fej"&gt;another blog.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What features do orchestration tools provide?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;High availability&lt;/strong&gt;: In simple words, high availability means that your application does not have any downtime, so it is always accessible by the users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: This means that the application has high performance, it loads fast and users have a very high rate of response rate from the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Disaster Recovery&lt;/strong&gt;:  it basically means that if the infrastructure has any problems like data is lost or the servers explode. the infrastructure has to have some kind of mechanism to pick up the data and restore it to the latest state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Some other features of Kubernetes are scheduling, scaling, load balancing, fault tolerance, deployment, automated rollouts, rollbacks, etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jPdkoycZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1643648026823/XVdVXqBXV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jPdkoycZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1643648026823/XVdVXqBXV.png" alt="kubernetes arch.png" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Overview
&lt;/h3&gt;

&lt;p&gt;Kubernetes architecture consists of two parts a master node and a worker node or node which is basically a simple server a physical or virtual machine, all the nodes join together to form a cluster.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Components of master node&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The master node is responsible for managing the cluster and it basically monitors and manages the nodes and the pods in a cluster so whenever there is a failure of a node it will move the workload to the other working node and take care of the overall cluster.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7eYu4Na---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1643797917863/X-pnoMyKmn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7eYu4Na---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1643797917863/X-pnoMyKmn.png" alt="master node.png" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;API server&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;It is the front-end for the Kubernetes control panel. The API server is responsible for the communications, it exposes APIs so that the users can interact with the API server.&lt;br&gt;
The Users, management devices, and the command line interface all talk to the API server to interact with the Kubernetes cluster.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;scheduler&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;it is responsible for scheduling the pods over multiple nodes, It can read the configuration from a configuration file, and accordingly, it selects the nodes where the pods can be scheduled.&lt;br&gt;
It watches newly created pods that have no node assigned and selects a node for them to run on.&lt;br&gt;
it obtains all this information from configuration files and indirectly from etcd datastore&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Control Manager&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;there 4 types of controllers behind control manager:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node controller: it is responsible for noticing and responding when the nodes go down.&lt;/li&gt;
&lt;li&gt;Replication Controller: It is responsible for maintaining the correct numbers of pods for every replication controller object in the system.&lt;/li&gt;
&lt;li&gt;Endpoints Controller: It is responsible for all the services and communication.&lt;/li&gt;
&lt;li&gt;Service account and token controller: It is responsible for maintaining accounts and API access.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;etcd&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;It is a distributed key-value store used to hold and manage the critical information that distributed systems need to keep running.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Components of worker node&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A worker node is a simple server physical or virtual machine where containers are deployed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GBtYDn8q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1643648068494/Xf0JRtn4d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GBtYDn8q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1643648068494/Xf0JRtn4d.png" alt="worker node.png" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Kublet&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;It is an agent running on each node, it communicates with the components from the master node.&lt;br&gt;
kubelet make sure that containers are running and healthy in a pod. In case Kubelet notices any issues with the pods running on the worker nodes, it tries to restart the Pod on the same node or a different node.&lt;br&gt;&lt;br&gt;
the kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Kube-Proxy&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;It is a network agent which runs on each node and is responsible for maintaining network configuration and rules. It also exposes services to the outside world. Kube-Proxy is the core networking component in Kubernetes&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Pods&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;A pod is the smallest unit of Kubernetes. So Pod is basically an abstraction over a container, it creates a running environment or a layer on top of the container, Pods is usually meant to run one application container inside of it, you can run multiple containers inside one pod but it's only the case if you have one application container and a helper container or some service that has to run inside of that pod,&lt;br&gt;
We interact and manage the containers using Pods. &lt;br&gt;
Each Pod can communicate with each others.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Containers&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Containers are Runtime Environments for containerized applications. We run container applications inside the containers. For more detailed information, check out my blog on &lt;a href="https://shubh22121.hashnode.dev/docker-made-easy"&gt;Docker&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Service and Ingress&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Service is a permanent IP address that can be attached to each pod.&lt;br&gt;
The lifecycles of service and pods are not connected so even if the pod dies the service and its IP address will stay.&lt;/p&gt;

&lt;p&gt;Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ryX8uP4T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1643797331194/UQ20_NUM5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ryX8uP4T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1643797331194/UQ20_NUM5.png" alt="ingress.png" width="683" height="260"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Use/Installation&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;online Kubernetes labs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following are the online platforms/playgrounds in case you test something on Kubernetes: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Kubernetes playground - &lt;a href="https://www.katacoda.com/courses/kubernetes/playground"&gt;https://www.katacoda.com/courses/kubernetes/playground&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Play with K8s - &lt;a href="https://labs.play-with-k8s.com/"&gt;https://labs.play-with-k8s.com/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Play with Kubernetes classroom  - &lt;a href="https://training.play-with-kubernetes.com/"&gt;https://training.play-with-kubernetes.com/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Kubernetes Installation tools&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  - Minikube
&lt;/h4&gt;

&lt;p&gt;minikube is a very quick way to install Kubernetes on your system especially if you have limited resources minikube will be very ideal to install and setup Kubernetes on the system, here we will be using a single system for master and for worker node so the same system it will have master instance and the worker instance.&lt;/p&gt;
&lt;h4&gt;
  
  
  - Kubeadm
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Cloud-based Kubernetes services&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GKE: Google Kubernetes Engine.&lt;/li&gt;
&lt;li&gt;AKS - Azure Kubernetes Service.&lt;/li&gt;
&lt;li&gt;Amazon EKS&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;usage&lt;/strong&gt;
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ brew install minikube
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The above command also installs kubectl as its dependency.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;after this command, you can use the following command to see the nodes.&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 nodes
NAME       STATUS   ROLES                  AGE   VERSION
minikube   Ready    control-plane,master   64s   v1.20.7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the minikube has 'master' as its role.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;**So there are 2 ways to create a pod *&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;1. directly :&lt;br&gt;
*&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-pod
spec:
  containers:
  - name: nginx
    image: nginx:1.14.2
    ports:
    - containerPort: 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To create the Pod shown above, run the following command:
&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;list all the pods
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ kubectl get pods 
NAME        READY   STATUS    RESTARTS   AGE
nginx-pod   1/1     Running   0          9m25s

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;delete the pod
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Using deployment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The pod is the smallest unit in the Kubernetes cluster but usually, in practice, you are not creating pods or you are not working with pods directly. There is an abstraction layer over the pods that is called deployment, so this is what we create and that creates the pods underneath.&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: Deployment
metadata:
  name: nginx-depl
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: 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;usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ kubectl apply -f nginx-depl.yaml
deployment.apps/nginx-depl created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;List all the deployments
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ kubectl get deployment
NAME         READY   UP-TO-DATE   AVAILABLE   AGE
nginx-depl   1/1     1            1           77m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;List all the Pods.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ kubectl get pods
NAME       READY   STATUS    RESTARTS   AGE
nginx-depl   1/1     Running   0          31m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;~ Executing a Pod&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ kubectl exec -it nginx-depl -- /bin/sh
# ls
bin  boot  dev etc  home  lib lib64  media  mnt  opt proc  root  run  sbin  srv  sys  tmp  usr  var
# hostname
nginx-depl
# exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;delete deployment
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; kubectl delete deployment nginx-depl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;What is the difference between Pods and Deployment?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pods:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs a single set of containers&lt;/li&gt;
&lt;li&gt;Good for occasional dev purposes&lt;/li&gt;
&lt;li&gt;Rarely used directly in production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Deployment:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs a set of identical pods&lt;/li&gt;
&lt;li&gt;Monitors the state of each pod, updating as necessary&lt;/li&gt;
&lt;li&gt;Good for dev&lt;/li&gt;
&lt;li&gt;Good for production&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>docker</category>
    </item>
    <item>
      <title>linux commands🐧</title>
      <dc:creator>Shubham Yadav</dc:creator>
      <pubDate>Tue, 04 Jan 2022 13:34:58 +0000</pubDate>
      <link>https://dev.to/shubhamyadav/linux-commands-3pop</link>
      <guid>https://dev.to/shubhamyadav/linux-commands-3pop</guid>
      <description>&lt;h1&gt;
  
  
  Types of shells
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Bourne shell (sh shell)&lt;/li&gt;
&lt;li&gt;C shell (csh shell)&lt;/li&gt;
&lt;li&gt;Z shell (zsh shell)&lt;/li&gt;
&lt;li&gt;Bourne again shell (bash shell)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  linux commands
&lt;/h1&gt;

&lt;h3&gt;
  
  
  basic commands
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;echo&lt;/code&gt; - print a string&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt; - list files in a directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; - change directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pwd&lt;/code&gt; - print working directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt; - make a directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rmdir&lt;/code&gt; - remove a directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm&lt;/code&gt; - remove a file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cp&lt;/code&gt; - copy a file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mv&lt;/code&gt; - move a file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cat&lt;/code&gt; - concatenate files and print on the standard output&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;grep&lt;/code&gt; - search for a pattern in a file&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  User accounts
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;whoami&lt;/code&gt; - print the name of the current user&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;id&lt;/code&gt; - print the user ID of the current user&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo&lt;/code&gt; - run a command as root&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;su&lt;/code&gt; - run a command as another user&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Download files
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;curl &amp;lt;url&amp;gt;&lt;/code&gt; - download a file from the internet&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;wget &amp;lt;url&amp;gt;&lt;/code&gt; - download a file from the internet&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Check OS version
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;uname -a&lt;/code&gt; - print operating system information&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;lsb_release -a&lt;/code&gt; - print operating system information&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Package managers
&lt;/h1&gt;

&lt;p&gt;RPM: Red Hat Package Manager&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;rpm -i &amp;lt;package&amp;gt;&lt;/code&gt; - install a package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rpm -e &amp;lt;package&amp;gt;&lt;/code&gt; - remove a package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rpm -q &amp;lt;package&amp;gt;&lt;/code&gt; - query a package&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;YUM: Yum Package Manager&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;yum install &amp;lt;package&amp;gt;&lt;/code&gt; - install a package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yum remove &amp;lt;package&amp;gt;&lt;/code&gt; - remove a package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yum list &amp;lt;package&amp;gt;&lt;/code&gt; - query a package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yum repolist&lt;/code&gt; - list available repositories&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Services
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;service &amp;lt;service&amp;gt; start&lt;/code&gt; - start a service&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl start &amp;lt;service&amp;gt;&lt;/code&gt; - start a service&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl stop &amp;lt;service&amp;gt;&lt;/code&gt; - stop a service&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl status &amp;lt;service&amp;gt;&lt;/code&gt; - check the status of a service&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl enable &amp;lt;service&amp;gt;&lt;/code&gt; - enable a service to start at boot&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;systemctl disable &amp;lt;service&amp;gt;&lt;/code&gt; - disable a service to start at boot&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  VI editor
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;vi &amp;lt;file&amp;gt;&lt;/code&gt; - open a file in vi editor&lt;/li&gt;
&lt;li&gt;to switch to insert mode: &lt;code&gt;i&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to switch to command mode: &lt;code&gt;esc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to switch to visual mode: &lt;code&gt;v&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to switch to replace mode: &lt;code&gt;r&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to delete a character: &lt;code&gt;x&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to delete a line: &lt;code&gt;dd&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to delete a word: &lt;code&gt;dw&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to copy a line: &lt;code&gt;yy&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to paste a line: &lt;code&gt;p&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to save a file: &lt;code&gt;:wq&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to quit vi: &lt;code&gt;:q&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to quit vi without saving: &lt;code&gt;:wq!&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to quit vi and exit: &lt;code&gt;:q!&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Networking
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;ifconfig&lt;/code&gt; - print network interface configuration&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;route&lt;/code&gt; - print routing table&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;netstat&lt;/code&gt; - print network statistics&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ping &amp;lt;host&amp;gt;&lt;/code&gt; - send ICMP echo request to a host&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;traceroute &amp;lt;host&amp;gt;&lt;/code&gt; - trace the route to a host&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dig &amp;lt;host&amp;gt;&lt;/code&gt; - query DNS information&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nslookup &amp;lt;host&amp;gt;&lt;/code&gt; - query DNS information&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nmap &amp;lt;host&amp;gt;&lt;/code&gt; - scan a network&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ss&lt;/code&gt; - print network statistics&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Routing
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;route add -net &amp;lt;network&amp;gt; &amp;lt;gateway&amp;gt;&lt;/code&gt; - add a route&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;route del -net &amp;lt;network&amp;gt;&lt;/code&gt; - delete a route&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;route add -host &amp;lt;host&amp;gt; &amp;lt;gateway&amp;gt;&lt;/code&gt; - add a route&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Docker Made Easy🐳</title>
      <dc:creator>Shubham Yadav</dc:creator>
      <pubDate>Mon, 13 Dec 2021 16:00:00 +0000</pubDate>
      <link>https://dev.to/shubhamyadav/docker-made-easy-1fej</link>
      <guid>https://dev.to/shubhamyadav/docker-made-easy-1fej</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;What is Docker?&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Docker is a tool for running applications in an isolated environment.&lt;/li&gt;
&lt;li&gt;It is similar to Virtual Machine but it's much faster and does not require a lot of memory and an entire operating system to operate.&lt;/li&gt;
&lt;li&gt;The cool thing about docker is that your application runs in exact same environment for eg. if it works on my machine it will definitely work on your machine, or if it works on the staging environment it will also work in a production environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What can I use Docker for?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Docker provides the ability to package and run an application in an isolated environment called containers. Containers are great for continuous integration and continuous deployment (CI/CD) workflows. Using docker you can significantly reduce the delay between writing code and running it in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Containers vs VM
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Containers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as an isolated process in userspace.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Virtual Machine
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;An application on a VM requires a guest OS and thus an underlying hypervisor to run. The hypervisor is used to create multiple machines on a host operating system and it manages virtual machines. These virtual machines have their own operating system and do not use the host’s operating system. They have some space allocated.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i78rb96nnjdwd71eumr.jpeg" alt="Image description" width="800" height="404"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Docker Architecture&lt;/strong&gt;
&lt;/h1&gt;

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

&lt;h3&gt;
  
  
  &lt;strong&gt;The Docker daemon&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The docker daemon listens to the API requests and manages Docker objects such as images, containers, network, and volumes.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Docker client&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The docker client is the primary way to interact with Docker. When you use the command using docker, the client sends these commands to deamon, which carries them out. The Docker client can communicate with more than one daemon.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Docker Registries&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use. When you pull the image Docker by default look for it on Docker Hub.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Docker Objects&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Images&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;An image is a read-only template with instructions for creating a Docker container. Often an image is based on another image, with some additional customization.&lt;br&gt;
You can create your own images or can use those created and published in a registry. To build your own image, you create a &lt;strong&gt;Dockerfile&lt;/strong&gt; with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image is a template for creating an environment of your choice. It is also a snapshot.&lt;/li&gt;
&lt;li&gt;Images are immutable. Once built, the files making up an image do not change. Images can be stored locally or in remote 
locations like hub.docker.com.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Containers&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using CLI. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Docker Compose&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. It is a declarative way of describing the components of a Docker application.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Docker Volume and Bind Mounts&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;By default, all the files inside the container are stored on a writable container layer.&lt;/li&gt;
&lt;li&gt;The data does not persist when the container is no longer running.&lt;/li&gt;
&lt;li&gt;Docker has two ways to persist data.&lt;/li&gt;
&lt;li&gt;1. Volumes&lt;/li&gt;
&lt;li&gt;2. Bind Mounts&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Volumes&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Volumes are a way to persist data between containers.&lt;/li&gt;
&lt;li&gt;volumes are stored in a part of the filesystem which is managed by Docker.&lt;/li&gt;
&lt;li&gt;a given volume can be mounted into multiple containers.&lt;/li&gt;
&lt;li&gt;when no running container is using the volume, it is still available.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Bind Mounts&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Bind mounts are stored anywhere on the host system.&lt;/li&gt;
&lt;li&gt;bind mounts are used to mount a volume from a container into another container.&lt;/li&gt;
&lt;li&gt;In Bind Mounts, the file or directory is referenced by its full path in the host system.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h4&gt;
  
  
  To see basic commands like pulling building images etc.&lt;a href="https://dev.to/shubhamyadav/docker-cheat-sheet-4ob3"&gt;click here&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Now that you know what docker is you can now create your application with tons of containers that interact with each other so you can imagine the effort to manage hundreds of containers manually, every time a container crashes or the communication between them is not working you have to manually fix these problems. Here is where the container-orchestration system comes into play, It helps in automating application deployment, scaling, and management. One of the very widely used COE is Kubernetes.&lt;/p&gt;

&lt;h4&gt;
  
  
  connect :&lt;a href="https://twitter.com/shubhztwt"&gt;twitter&lt;/a&gt;
&lt;/h4&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Docker Commands 🐳</title>
      <dc:creator>Shubham Yadav</dc:creator>
      <pubDate>Thu, 05 Aug 2021 17:46:57 +0000</pubDate>
      <link>https://dev.to/shubhamyadav/docker-cheat-sheet-4ob3</link>
      <guid>https://dev.to/shubhamyadav/docker-cheat-sheet-4ob3</guid>
      <description>&lt;h1&gt;
  
  
  docker images commands
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Shows the help for the &lt;code&gt;docker images&lt;/code&gt; command.
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;pulls an image from a registry.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker pull [image] `
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Pulls an image from a registry and tag it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker pull [image]:[tag] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Lists all images in the local registry.
&lt;/li&gt;
&lt;/ul&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;ul&gt;
&lt;li&gt;list image id only
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;list dangling images
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Runs an image in a new container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker run [image] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Lists all running containers.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;docker ps&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs an image in a new container and names it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker run --name [container] [image] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Runs an image in a new interactive container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker run -it [image] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Runs an image in a new interactive container and names it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker run -it --name [container] [image] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Inspects a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker inspect [container] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Removes an image from the local registry.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker rmi [image] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Removes an image from the local registry and force remove it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker rmi -f [image] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Shows the history of an image.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker history [image] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  docker container commands
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Lists all running containers.
&lt;/li&gt;
&lt;/ul&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;ul&gt;
&lt;li&gt;Runs an image in a new container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker run [image] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Starts a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker start [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Stops a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker stop [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Pauses a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker pause [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Unpauses a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker unpause [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Restarts a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker restart [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Shows the running processes of a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker top [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Shows the resource usage of a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker stats [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Inspects a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker inspect [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Attaches to a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker attach [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;docker attach usage : Use docker attach to attach your terminal’s standard input, output, and error (or any combination of the three) to a running container using the container’s ID or name. This allows you to view its ongoing output or to control it interactively, as though the commands were running directly in your terminal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kills a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker kill [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Removes a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker rm [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Shows the history of a container.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker history [container-name] / [container-id] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  dockerfile commands
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Builds an image from a Dockerfile.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker build [path] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Builds an image from a Dockerfile and tag it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker build -t [image] [path] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  docker compose commands
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Shows the configuration of a service.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker compose config [service] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Starts services.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker-compose up [service] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Starts services and keep them running.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker-compose up -d [service] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Stops services.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker-compose down [service] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Lists all running services.
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Useful Git Commands.💻</title>
      <dc:creator>Shubham Yadav</dc:creator>
      <pubDate>Tue, 01 Jun 2021 07:25:58 +0000</pubDate>
      <link>https://dev.to/shubhamyadav/useful-git-commands-1fdn</link>
      <guid>https://dev.to/shubhamyadav/useful-git-commands-1fdn</guid>
      <description>&lt;h4&gt;
  
  
  Git is an example of a distributed version control system commonly used for open source and commercial software development.
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Let's go :&lt;br&gt;
initalize git in files/directories.&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;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;1.Clone the repository in your local system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/&amp;lt;your-user-name&amp;gt;/&amp;lt;repo-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.Connect to remote&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin &amp;lt;url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.To check the current status of the repository.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;4.To add specific file to the staging area.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add &amp;lt;file-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.To add all changed file to staging area.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;6.To unstage a certain file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git restore --stagged &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;7.To see recent changes in the repository.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;8.To give a message and commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "your-message"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;9.To see the commit history.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;10.To see last specific commits (eg. Last 3 commits).&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;11.To discard the specific commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git revert &amp;lt;commit-token&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;12.To undo the commit and bring back changes to staging area.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --soft HEAD &amp;lt;no._of_commit_to_revert&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;13.To show remote URLs&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;14.To fetch the changes from origin to your local system.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;15.To create a branch named branch-name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch &amp;lt;branch-name&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;16.To make changes in the specific branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;17.To merge sub branch to main branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git merge &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;18.To delete a specific branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -d &amp;lt;branch-name&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;19.To push the recent commits.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;20.Connect to remote&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin &amp;lt;url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;21.To push the current branch and set the remote as upstream&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push --set-upstream origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;22.To rename branch name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -m &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;23.change url for git remote repo&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote set-url origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>github</category>
      <category>git</category>
      <category>tooling</category>
      <category>commands</category>
    </item>
  </channel>
</rss>
