<?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>Neha Dhondiyal &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/author/neha-dhondiyal/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>Wed, 06 Oct 2021 05:26:35 +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>kubernetes in Neha&#8217;s word</title>
		<link>https://www.bestdevops.com/kubernetes-in-nehas-word/</link>
		
		<dc:creator><![CDATA[Neha Dhondiyal]]></dc:creator>
		<pubDate>Mon, 04 Oct 2021 10:25:04 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21970</guid>

					<description><![CDATA[Why Kubernetes ? Containers were solving the problem that we are facing with Vms , such as Uptime was very [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Why Kubernetes ?</p>



<ul class="wp-block-list"><li>Containers were solving the problem that we are facing with Vms , such as Uptime was very quick as well as stats were low but there were several issues .</li><li>Container technology were not providing the scaling , As the docker host can manage the containers only on it&#8217;s host machine, It was becoming difficult for scaling the containers.</li><li>if we deploy containers having same image for the application ( ex . nginx , mysql ) on the same docker host that there were issue with port forwarding as single port can be allocated to single container on the host machine.</li><li>Docker engine on one node cannot control the containers on other nodes.</li><li>Due to these above problems there is a need for Kubernetes Orchestration</li><li>Kubernetes have resolved all the problems that we have faced with container technologies.</li><li>It provides a single interface for managing the containers , managing the networking that resolved the port forwarding issue and also now there is no need to allocate the container to a single node only.</li><li>It also provides the capability to schedule the nodes as and when required .</li><li>It also provides other capabilities like namespaces , networking , storage , etc.</li></ul>



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



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



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



<ul class="wp-block-list"><li>Kubernetes acquires it&#8217;s name from the word &#8220;Helmsman&#8221;, which indicates the a pilot that can take care of everyhting.</li><li>Kubernetes is an orchestration tool for maintaining the containers.</li><li>It consists of various components that helps in eliminating a lot of trouble for the operation people. It follows the declarative approach for writing the manifests.</li><li>It provides capability to the organisation to enable continous integration and continous Delivery.</li></ul>



<p class="wp-block-paragraph">How Kubernetes works?</p>



<ul class="wp-block-list"><li>Kubernetes consists of the various components such as master ( control Plane) or node.</li><li>the master is also divided into various components such as apiserver , controller-manager , etcd store , cloud-store , scheduler.</li><li>api -server  is the main component responsible for communication within cluster and outside cluster using stateless apis</li><li>scheduler distributes the workload among the nodes .</li><li>etcd store consists of the key-value pairs for maintianing all the configurations and it is also the source of truth.</li><li>controller-manager just checks the controller scripts and try to retrieve information from the pods on the nodes through the api-server. If anything is not at desired state it asks the api-server to inform the scheduler</li><li>On the node side we are having kubelete, kube-proxy and container engine.</li></ul>



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



<p class="wp-block-paragraph">What is a Pod ?</p>



<ul class="wp-block-list"><li>A pod is an logical unit and the smallest unit of k8s.</li><li>It is not created but instaintiated.</li><li>It consists of the conatines which can be loosely coupled or tightly coupled</li><li>All containers share the same pod resources such as namespaces , networking , storage.</li></ul>



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



<p class="wp-block-paragraph">Define ReplicaSets with atleast 2 example .</p>



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



<ul class="wp-block-list"><li>ReplicaSets and ReplicationController are same but the only difference is that ReplicaSets are a combination of ReplicationController with all bug fixes of rc.</li><li>ReplicationController/ReplicaSets  are used for creating pods replicas. </li><li>It  make sure that that number of pods always exists and should match with the desired state.</li><li>Replication Controller also provides other benefits, such as the ability to scale the number of pods, and to update or delete multiple pods with a single command.</li></ul>



<p class="wp-block-paragraph">Example for replication controller:</p>



<p class="wp-block-paragraph">Example1: Creating rc using yaml file</p>



<pre class="wp-block-preformatted">apiVersion: extensions/v1beta1
kind: Deployment
metadata:
 &nbsp;name: soaktest
spec:
 &nbsp;replicas: 5
 &nbsp;template:
 &nbsp;&nbsp;&nbsp;metadata:
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;labels:
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app: soaktest
 &nbsp;&nbsp;&nbsp;spec:
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;containers:
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- name: soaktest
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image: nickchase/soaktest
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ports:
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- containerPort: 80</pre>



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



<p class="wp-block-paragraph">Example2: Increasing number of pods through cli.</p>



<p class="wp-block-paragraph">kubectl scale &#8211;replicas=7 rc/replicationcontroller-example -n=neha</p>



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



<p class="wp-block-paragraph">apiVersion: apps/v1<br>kind: ReplicaSet<br>metadata:<br>creationTimestamp: &#8220;2021-10-06T05:18:08Z&#8221;<br>generation: 1<br>labels:<br>app: guestbook<br>tier: frontend<br>name: frontend<br>namespace: neha<br>resourceVersion: &#8220;194271&#8221;<br>uid: 0f3e11bf-58e2-40df-8a9f-ec822d094339<br>spec:<br>replicas: 3<br>selector:<br>matchLabels:<br>tier: frontend<br>template:<br>metadata:<br>creationTimestamp: null<br>labels:<br>tier: frontend<br>spec:<br>containers:<br>&#8211; image: nginx<br>imagePullPolicy: Always<br>name: nginx<br>resources: {}<br>terminationMessagePath: /dev/termination-log<br>terminationMessagePolicy: File<br>dnsPolicy: ClusterFirst<br>restartPolicy: Always<br>schedulerName: default-scheduler<br>securityContext: {}<br>terminationGracePeriodSeconds: 30</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
