<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>pradeep kh &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/author/pradeep-kh/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Thu, 16 Sep 2021 06:49:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Define kubernetes ReplicaSets with Example and commands:</title>
		<link>https://www.bestdevops.com/define-kubernetes-replicasets-with-example-and-commands-2/</link>
		
		<dc:creator><![CDATA[pradeep kh]]></dc:creator>
		<pubDate>Thu, 16 Sep 2021 06:48:04 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21488</guid>

					<description><![CDATA[A ReplicaSet&#8217;s purpose is to maintain a stable set of replica Pods running at any given time. As such, it [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-table"><table><tbody><tr></tr><tr><td></td></tr><tr><td></td></tr></tbody></table></figure>



<p class="wp-block-paragraph">A ReplicaSet&#8217;s purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods</p>



<p class="wp-block-paragraph">There are many ways we can use replicasets such that always required number of pods running is guarangteed.</p>



<ol class="wp-block-list"><li>While creating the deployment</li></ol>



<pre class="wp-block-preformatted"> kubectl create deployment pradeepa--image=scmgalaxy/nginx-devopsschoolv1 --replicas=3 -n=pradeepa</pre>



<p class="wp-block-paragraph">2. While the deployment is running</p>



<pre class="wp-block-preformatted">kubectl edit deploy pradeepa-n=pradeepa
Replicas:               2 desired | 2 updated | 2 total | 2 available | 0 unavailable //change this value to desired number of replicas</pre>



<p class="wp-block-paragraph">3. Using scale option</p>



<pre class="wp-block-preformatted">kubectl scale --replicas=1 deploy/pradeepa-n=pradeepa</pre>



<h2 class="wp-block-heading">Always the required number of pods are running is guaranteed.</h2>



<pre class="wp-block-preformatted">[centos@ip-172-31-22-14 pradeepa]$ kubectl create deployment pradeepa--image=scmgalaxy/nginx-devopsschoolv1 --replicas=3 -n=pradeepa
deployment.apps/pradeepa created
[centos@ip-172-31-22-14 pradeepa]$ kubectl get deploy -n=pradeepa
NAME READY UP-TO-DATE AVAILABLE AGE
pradeepa 3/3 3 3 9s
[centos@ip-172-31-22-14 pradeepa]$ kubectl get pods -n=pradeepa
NAME READY STATUS RESTARTS AGE
pradeepa-88bcb4f5d-9jq4d 1/1 Running 0 18s
pradeepa-88bcb4f5d-dtn2c 1/1 Running 0 18s
pradeepa-88bcb4f5d-hppkz 1/1 Running 0 18s
[centos@ip-172-31-22-14 pradeepa]$ <strong>kubcectl delete pod pradeepa-88bcb4f5d-hppkz -n=pradeepa</strong>
-bash: kubcectl: command not found
[centos@ip-172-31-22-14 pradeepa]$ kubectl delete pod pradeepa-88bcb4f5d-hppkz -n=pradeepa
pod "pradeepa-88bcb4f5d-hppkz" deleted
[centos@ip-172-31-22-14 pradeepa]$ kubectl get pods
NAME READY STATUS RESTARTS AGE
pradeepa1/1 Running 0 93m
[centos@ip-172-31-22-14 pradeepa]$ kubectl get pods -n=pradeepa
NAME READY STATUS RESTARTS AGE
pradeepa-88bcb4f5d-9jq4d 1/1 Running 0 52s
pradeepa-88bcb4f5d-dtn2c 1/1 Running 0 52s
pradeepa-88bcb4f5d-qms2q 1/1 Running 0 <strong>10s</strong> //this is the newly created pod after deleting the existing POD</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Day3 Assignment&#8217;s</title>
		<link>https://www.bestdevops.com/day3-assignments/</link>
		
		<dc:creator><![CDATA[pradeep kh]]></dc:creator>
		<pubDate>Wed, 15 Sep 2021 10:10:15 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21326</guid>

					<description><![CDATA[What is Kubernetes and its feature? Kubernates is an open-source system for automating deployment, scaling, and management of containerized applications. It [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>What is Kubernetes and its feature?</strong></p>



<p class="wp-block-paragraph">Kubernates is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery.</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">Feature:</p>



<p class="wp-block-paragraph">Some of the features which Kubernates offers are:<br>· Pod -collection contains<br>· <em>Replication Controller</em><br>· <em>Storage Management</em><br>· <em>Resource Monitoring</em><br>· <em>Health Checking</em><br>· <em>Horizontal Auto Scaling</em><br>· <em>Service Discover</em>y<br>· <em><em>Networking</em></em><br>· <em><em>Services</em></em><br>· <em><em>ConfigMap and Secret</em></em><br>· <em><em>Rolling Deployment and Rollback</em></em><br>· <em><em>Logging</em></em></p>



<p class="wp-block-paragraph"><strong>How kubernetes works? Explain each components with Short Summary</strong></p>



<p class="wp-block-paragraph">Kubernetes keeps track of container applications that are deployed into the cloud. It restarts orphaned containers, shuts down containers when they&#8217;re not being used, and automatically provisions resources like memory, storage, and CPU when necessary.</p>



<figure class="wp-block-image"><img decoding="async" src="https://images.ctfassets.net/w1bd7cq683kz/5Ex6830HzBPU5h8Ou8xQAB/2c948105fc10094348203bec6c1eab04/Kubernetes_20architecture_20diagram.png" alt="Kubernetes architecture diagram" /></figure>



<h3 class="wp-block-heading" id="pods">Pods<a href="https://sensu.io/blog/how-kubernetes-works#pods"></a></h3>



<p class="wp-block-paragraph">A Kubernetes pod is a group of containers, and is the smallest unit that Kubernetes administers. Pods have a single IP address that is applied to every container within the pod. Containers in a pod share the same resources such as memory and storage. </p>



<h3 class="wp-block-heading" id="deployments">Deployments<a href="https://sensu.io/blog/how-kubernetes-works#deployments"></a></h3>



<p class="wp-block-paragraph">Kubernetes deployments define the scale at which you want to run your application by letting you set the details of how you would like pods replicated on your Kubernetes nodes. .</p>



<h3 class="wp-block-heading" id="services">Services<a href="https://sensu.io/blog/how-kubernetes-works#services"></a></h3>



<p class="wp-block-paragraph"> if a pod encounters an issue , it’s Kubernetes’ job to replace it so that the application doesn’t experience any downtime.</p>



<h3 class="wp-block-heading" id="nodes">Nodes<a href="https://sensu.io/blog/how-kubernetes-works#nodes"></a></h3>



<p class="wp-block-paragraph">A Kubernetes node manages and runs pods.</p>



<h3 class="wp-block-heading" id="cluster">Cluster<a href="https://sensu.io/blog/how-kubernetes-works#cluster"></a></h3>



<p class="wp-block-paragraph">A cluster is all of the above components put together as a single unit.</p>



<h2 class="wp-block-heading" id="kubernetes-components">Kubernetes components<a href="https://sensu.io/blog/how-kubernetes-works#kubernetes-components"></a></h2>



<p class="wp-block-paragraph">With a general idea of how Kubernetes is assembled, it’s time to take a look at the various software components that make sure everything runs smoothly. Both the control plane and individual worker nodes have three main components each.</p>



<h3 class="wp-block-heading" id="control-plane">Control plane<a href="https://sensu.io/blog/how-kubernetes-works#control-plane"></a></h3>



<h4 class="wp-block-heading" id="api-server">API Server<a href="https://sensu.io/blog/how-kubernetes-works#api-server"></a></h4>



<p class="wp-block-paragraph">The API server exposes a REST interface to the Kubernetes cluster. All operations against pods, services, and so forth, are executed programmatically by communicating with the endpoints provided by it.</p>



<h4 class="wp-block-heading" id="scheduler">Scheduler<a href="https://sensu.io/blog/how-kubernetes-works#scheduler"></a></h4>



<p class="wp-block-paragraph">The scheduler is responsible for assigning work to the various nodes. It keeps watch over the resource capacity and ensures that a worker node’s performance is within an appropriate threshold.</p>



<h4 class="wp-block-heading" id="controller-manager">Controller manager<a href="https://sensu.io/blog/how-kubernetes-works#controller-manager"></a></h4>



<p class="wp-block-paragraph">The controller-manager is responsible for making sure that the shared state of the cluster is operating as expected. More accurately, the controller manager oversees various controllers which respond to events (e.g., if a node goes down).</p>



<h3 class="wp-block-heading" id="worker-node-components">Worker node components<a href="https://sensu.io/blog/how-kubernetes-works#worker-node-components"></a></h3>



<h4 class="wp-block-heading" id="kubelet">Kubelet<a href="https://sensu.io/blog/how-kubernetes-works#kubelet"></a></h4>



<p class="wp-block-paragraph">A Kubelet tracks the state of a pod to ensure that all the containers are running. It provides a heartbeat message every few seconds to the control plane. If a replication controller does not receive that message, the node is marked as unhealthy.</p>



<h4 class="wp-block-heading" id="kube-proxy">Kube proxy<a href="https://sensu.io/blog/how-kubernetes-works#kube-proxy"></a></h4>



<p class="wp-block-paragraph">The Kube proxy routes traffic coming into a node from the service. It forwards requests for work to the correct containers.</p>



<h4 class="wp-block-heading" id="etcd">etcd<a href="https://sensu.io/blog/how-kubernetes-works#etcd"></a></h4>



<p class="wp-block-paragraph">etcd is a distributed key-value store that Kubernetes uses to share information about the overall state of a cluster. </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Day2 Assignment&#8217;s</title>
		<link>https://www.bestdevops.com/differences-between-cmd-and-entrypoint-with-example-2/</link>
		
		<dc:creator><![CDATA[pradeep kh]]></dc:creator>
		<pubDate>Tue, 14 Sep 2021 10:44:30 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21280</guid>

					<description><![CDATA[What is docker update and docker wait? Explain with example commands. update : Update configuration of one or more containers [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-table"><table><tbody><tr></tr><tr><td></td></tr><tr><td></td></tr></tbody></table></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"><strong>What is docker update and docker wait? Explain with example commands.</strong></p>



<p class="wp-block-paragraph"><strong>update : </strong>Update configuration of one or more containers</p>



<p class="wp-block-paragraph">docker update f4d703072499</p>



<p class="wp-block-paragraph"><br><strong>Wait :</strong> wait Block until one or more containers stop, then print their exit codes</p>



<p class="wp-block-paragraph">docker wait  f4d703072499 </p>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-table"><table><tbody><tr><td><strong>CMD</strong></td><td><strong>ENTRYPOINT</strong></td></tr><tr><td>Can be overridden</td><td>Cannot be overridden</td></tr><tr><td>Cannot append additional params</td><td>Can be appended</td></tr><tr><td>Command to run when container starts or arg to ENTRYPOINT if specified</td><td>Always first command to run when container starts</td></tr><tr><td>Multiple times can be added in the dockerfile but the last line will override the previous</td><td>Same behavior as CMD</td></tr><tr><td>Treated as additional param when it is used along with ENTRYPOINT</td><td>Always the main command<br></td></tr></tbody></table></figure>



<p class="wp-block-paragraph">what is tempfs in docker volume and how it use it?</p>



<p class="wp-block-paragraph">If you&#8217;re running Docker on Linux, you have a third option: tmpfs mounts. &#8230; When you create a container with a tmpfs mount, the container can create files outside the container&#8217;s writable layer. As opposed to volumes and bind mounts, a tmpfs mount <strong>is </strong>temporary, and only persisted in the host memory.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Docker assignment1</title>
		<link>https://www.bestdevops.com/docker-assignment1/</link>
		
		<dc:creator><![CDATA[pradeep kh]]></dc:creator>
		<pubDate>Mon, 13 Sep 2021 07:21:02 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21119</guid>

					<description><![CDATA[What is Docker? Its a tool and platform which managing the container. Docker is a software platform that allows you to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>What is Docker?</strong></p>



<p class="wp-block-paragraph">Its a tool and platform which managing the container. <em>Docker</em> is a software platform that allows you to build, test, and deploy applications quickly. Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers.</p>



<p class="wp-block-paragraph"><strong>What is Container?</strong></p>



<p class="wp-block-paragraph">Its Logical entity. It is a running instance of the Docker Image. Docker Image is a template that contains the application, and all the dependencies required to run that application on Docker</p>



<p class="wp-block-paragraph">A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.</p>



<p class="wp-block-paragraph"><strong>Benefit of Docker?</strong></p>



<p class="wp-block-paragraph">Docker is essentially a toolkit that enables developers to build, deploy, run, update, and stop containers using simple commands and work-saving automation through a single API.</p>



<p class="wp-block-paragraph">With Docker, developers can focus on writing code without worrying about the system on which their code will run. Applications become truly portable. This flexibility can increase resource use per server and may reduce the number of systems needed because of its lower overhead, which in turn reduces cost.</p>



<p class="wp-block-paragraph"><strong>Docker Architecture?</strong></p>



<p class="wp-block-paragraph">Docker uses a client-server architecture. The Docker <em>client</em> talks to the Docker <em>daemon</em>, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon <em>can</em> run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.</p>



<figure class="wp-block-image is-resized"><img fetchpriority="high" decoding="async" src="https://docs.docker.com/engine/images/architecture.svg" alt="Docker Architecture Diagram" width="578" height="301" /></figure>



<p class="wp-block-paragraph"><strong>Container lifecycle?</strong></p>



<p class="wp-block-paragraph">There are different stages when we create a Docker container which is known as Docker Container Lifecycle. Some of the states are:</p>



<ul class="wp-block-list"><li><strong>Created</strong>: A container that has been created but not started</li><li><strong>Running</strong>: A container running with all its processes</li><li><strong>Paused</strong>: A container whose processes have been paused</li><li><strong>Stopped</strong>: A container whose processes have been stopped</li><li><strong>Deleted</strong>: A container in a dead state</li></ul>



<figure class="wp-block-image is-resized"><img decoding="async" src="https://eadn-wc03-4064062.nxedge.io/cdn/wp-content/uploads/2020/10/Capture-5.png" alt="Docker Container lifecycle" width="478" height="254" /></figure>



<p class="wp-block-paragraph"><strong>How Docker Works</strong></p>



<p class="wp-block-paragraph">Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called namespaces to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
