<?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>TechieRoop</title>
	<atom:link href="https://techieroop.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://techieroop.com</link>
	<description>Solution for DevOps &#38; Open Source Technology</description>
	<lastBuildDate>Sun, 11 Feb 2024 05:24:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://i0.wp.com/techieroop.com/wp-content/uploads/2021/04/cropped-android-chrome-512x512-1.png?fit=32%2C32&#038;ssl=1</url>
	<title>TechieRoop</title>
	<link>https://techieroop.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">192312049</site>	<item>
		<title>What is pod affinity in Kubernetes?</title>
		<link>https://techieroop.com/what-is-pod-affinity-in-kubernetes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-is-pod-affinity-in-kubernetes</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Sun, 11 Feb 2024 05:24:06 +0000</pubDate>
				<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1390</guid>

					<description><![CDATA[<p>Pod affinity in Kubernetes is a concept that allows you to influence the scheduling of pods in such a way that they are placed on nodes with other pods that [&#8230;]</p>
<p>The post <a href="https://techieroop.com/what-is-pod-affinity-in-kubernetes/">What is pod affinity in Kubernetes?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<p class="">Pod affinity in <a href="https://techieroop.com/category/kubernetes/" target="_blank" rel="noopener" title="">Kubernetes </a>is a concept that allows you to influence the scheduling of pods in such a way that they are placed on nodes with other pods that have a specified label or set of labels. It helps in improving the performance and efficiency of your applications by co-locating related pods on the same node.</p>



<p class="">There are two types of pod affinity:</p>



<ol class="wp-block-list">
<li class=""><strong>Node Affinity:</strong> This type of affinity ensures that pods are scheduled to nodes with specific labels. You can specify node affinity rules based on node labels, and pods that match these rules are more likely to be scheduled on nodes that meet the specified criteria. Example of node affinity YAML:</li>
</ol>



<pre class="wp-block-code"><code>   affinity:
     nodeAffinity:
       requiredDuringSchedulingIgnoredDuringExecution:
         nodeSelectorTerms:
         - matchExpressions:
           - key: &lt;label-key&gt;
             operator: In
             values:
             - &lt;label-value&gt;</code></pre>



<ol start="2" class="wp-block-list">
<li class=""><strong>Pod Affinity:</strong> This type of affinity ensures that a pod is scheduled to nodes with other pods that have certain labels. It allows you to specify affinity rules at the pod level, and pods are scheduled close to other pods that satisfy these rules. Example of pod affinity YAML:</li>
</ol>



<pre class="wp-block-code"><code>   affinity:
     podAffinity:
       requiredDuringSchedulingIgnoredDuringExecution:
       - labelSelector:
           matchExpressions:
           - key: &lt;label-key&gt;
             operator: In
             values:
             - &lt;label-value&gt;
         topologyKey: &lt;node-label-key&gt;</code></pre>



<p class="">In both cases, the affinity rules can be either &#8220;requiredDuringSchedulingIgnoredDuringExecution&#8221; (hard affinity) or &#8220;preferredDuringSchedulingIgnoredDuringExecution&#8221; (soft affinity). Hard affinity means that the rules must be satisfied for the pod to be scheduled, while soft affinity allows some flexibility.</p>



<p class="">Pod affinity is useful in scenarios where certain pods benefit from being close to each other for performance reasons or to facilitate communication. For example, you might want to schedule pods of a database and its corresponding application on the same node to minimize latency and maximize throughput.</p>



<p class=""><strong>Reference</strong>: <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/" target="_blank" rel="noopener" title="">https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/</a></p>



<p class=""></p><p>The post <a href="https://techieroop.com/what-is-pod-affinity-in-kubernetes/">What is pod affinity in Kubernetes?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1390</post-id>	</item>
		<item>
		<title>Top 10 DevOps Interview Questions</title>
		<link>https://techieroop.com/top-10-devops-interview-questions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=top-10-devops-interview-questions</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Sat, 29 Apr 2023 13:42:30 +0000</pubDate>
				<category><![CDATA[DevOPS]]></category>
		<category><![CDATA[Ansible]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell script]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1340</guid>

					<description><![CDATA[<p>Top 10 DevOps Interview Questions I have listed down top 10 DevOps interview questions on few topics like, Git, Maven, Jenkins, Docker, Kubernetes, Ansible. Git: Maven ( Hint: Builds, Documentation, [&#8230;]</p>
<p>The post <a href="https://techieroop.com/top-10-devops-interview-questions/">Top 10 DevOps Interview Questions</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2 class="wp-block-heading">Top 10 DevOps Interview Questions</h2>



<p>I have listed down top 10 DevOps interview questions on few topics like, Git, Maven, Jenkins, Docker, Kubernetes, Ansible. </p>



<ol class="wp-block-list">
<li>What is the need for DevOps?</li>



<li>What is meant by Continuous Integration?</li>



<li>What is the difference between Continuous Delivery vs Continuous Deployment?</li>



<li>How is devOps different from Agile/SDLC?</li>
</ol>



<h3 class="wp-block-heading">Git:</h3>



<ol class="wp-block-list">
<li>What is the need of Git?&nbsp;What is the difference between Git vs Github?</li>



<li>How to create a new branch in Git?&nbsp;</li>



<li>What is the branching and merging Strategy you are following in your company?</li>



<li>How will you resolve the conflict in Git?</li>



<li>Difference between git pull vs git fetch?</li>



<li>How to revert un-pushed changes in Git?</li>



<li>How to update the last commit message in git?</li>



<li>How to update the second last commit message in git? ( Hint: using git rebase)</li>



<li>How will you merge changes from one branch to another branch?</li>



<li>How to merge multiple sequence commits into a single commit in git? ( Hint : git squash)</li>
</ol>



<h3 class="wp-block-heading">Maven</h3>



<ol class="wp-block-list">
<li>What is Maven?</li>



<li>What aspects are managed by Maven?</li>
</ol>



<p>        ( Hint: Builds, Documentation, Reporting,SCMs,Releases,Distribution)</p>



<ol class="wp-block-list" start="3">
<li>What is the command to install the JAR file in a local repository?</li>
</ol>



<p>        ( Hint: mvn install )</p>



<ol class="wp-block-list" start="4">
<li>What is difference b/w mvn install vs mvn package</li>



<li>What is the purpose of the mvn clean command?</li>



<li>What is POM?</li>



<li>What are the build phases in Maven?</li>



<li>What is a Maven artifact?</li>



<li>Name the three build lifecycle of Maven.</li>



<li>What is a Maven Repository and types of Maven repository?</li>
</ol>



<h3 class="wp-block-heading">Jenkins&nbsp;</h3>



<ol class="wp-block-list">
<li>What is Jenkins ? How will you use Jenkins to automate CI/CD ?</li>



<li>How to configure your Github or Bitbucket repository to trigger the build when any changes happen in code ? Please explain all types of Build Trigger In Jenkins?</li>



<li>Explain End to End java application Pipeline?</li>



<li>How will you configure Junit to run the test with Jenkins Pipeline ?</li>



<li>How to integrate the Selenium test with Jenkins Pipeline ?</li>



<li>What are the differences between Jenkins and TeamCity ?</li>



<li>How to configure slave nodes in Jenkins ?</li>



<li>What is the difference between declarative and scripted pipeline ?</li>



<li>Where to store the global credentials in jenkins??</li>



<li>How does your UAT build trigger when your Dev build completes? How did you configure the dependency ?&nbsp;</li>
</ol>



<h3 class="wp-block-heading">Docker</h3>



<ol class="wp-block-list">
<li>How to stop all docker containers?</li>
</ol>



<p>      docker kill $(docker ps -q)</p>



<ol class="wp-block-list" start="2">
<li>How to stop docker containers and remove them?</li>
</ol>



<p>    docker rm $(docker ps -a -q)</p>



<ol class="wp-block-list" start="3">
<li>How to remove all Docker Images?</li>
</ol>



<p>     docker rmi $(docker images -q)</p>



<ol class="wp-block-list" start="4">
<li>Remove all exited containers</li>
</ol>



<p>     List: docker ps -a -f status=exited</p>



<p>     Remove: docker rm $(docker ps -a -f status=exited -q)</p>



<ol class="wp-block-list" start="5">
<li>Remove containers using more than one filter</li>
</ol>



<p>     List: docker ps -a -f status=exited -f status=created</p>



<p>     Remove: docker rm $(docker ps -a -f status=exited -f status=created -q)</p>



<ol class="wp-block-list" start="6">
<li>Remove containers according to a pattern</li>
</ol>



<p>     List: docker ps -a | grep “pattern”</p>



<p>     Remove: docker ps -a | grep “pattern” | awk ‘{print $1}’ | xargs docker rm</p>



<ol class="wp-block-list" start="7">
<li>Remove one or more specific volumes</li>
</ol>



<p>    List: docker volume ls</p>



<p>    Remove: docker volume rm volume_name</p>



<ol class="wp-block-list" start="8">
<li>Remove dangling volumes</li>
</ol>



<p>    List: docker volume ls -f dangling=true</p>



<p>    Remove: docker volume prune</p>



<ol class="wp-block-list" start="9">
<li>Remove a container and its volume</li>
</ol>



<p>    docker rm -v container_name</p>



<ol class="wp-block-list" start="10">
<li>How to create a multistage Dockerfile?&nbsp;&nbsp;What is benefit of Multi-Layer Docker file&nbsp;?</li>



<li>What are the benefits of a Container platform over a Virtual machine?&nbsp;&nbsp;</li>



<li>Can we run multiple containers within a single pod? What are the use cases when we should use it?&nbsp;&nbsp;</li>
</ol>



<h3 class="wp-block-heading">Ansible</h3>



<ol class="wp-block-list">
<li>What is Roles in Ansible?</li>



<li>What are the uses of ansible templates?&nbsp;</li>



<li>Write an ansible playbook to deploy the Apache in DEV, UAT and PROD environment?&nbsp;</li>



<li>Write down Ansible playbook to install Ngnix server?</li>



<li>What are the advantages of Ansible over other configuration management tools?&nbsp;</li>



<li>How can you run ansible tasks from root user?&nbsp;</li>



<li>What is a handler and how can we use it in Ansible ?&nbsp;</li>



<li>Can we create generic playbook to install software/package in Debian and CentOS?https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_conditionals.html</li>



<li>How do you access Shell Environment Variables?</li>



<li>How to keep sensitive configuration in Ansible? ( Hint : Check ansible vault) </li>
</ol>



<h3 class="wp-block-heading">Kubernetes&nbsp;</h3>



<ol class="wp-block-list">
<li>What types of Services are present in Kubernetes ?&nbsp;</li>



<li>What are the roles of master and data nodes in Kubernetes ?&nbsp;</li>



<li>What are the advantages to having a namespace in any cloud platform?&nbsp;</li>



<li>If any application requires web application code, database then how will they communicate to each other?&nbsp;</li>



<li>When any pods die and it creates a new pod automatically then what all events happened in the backend to bring the pod back?</li>



<li>How to configure auto-scaling in Kubernetes?</li>
</ol>



<p>          <a href="https://kubernetes.io/blog/2016/07/autoscaling-in-kubernetes/">https://kubernetes.io/blog/2016/07/autoscaling-in-kubernetes/</a></p>



<ol class="wp-block-list" start="7">
<li>How do pods communicate internally in Kubernetes?&nbsp;</li>



<li>How to expose your web-application to the external world?&nbsp;</li>



<li>Difference between Ingress and Ingress controller?</li>



<li>Can you explain the differences between Docker Swarm and Kubernetes?</li>
</ol>



<h3 class="wp-block-heading">Basic Linux and Bash Scripting</h3>



<ol class="wp-block-list">
<li>How to check processes which are taking more memory and CPU?&nbsp;</li>



<li>How to check which files/directory are taking more space?</li>



<li>Please tell us how you will check if a file exists on the filesystem?</li>
</ol>



<p>References: </p>



<p><a href="https://github.com/roopendra/devops-interview-questions-answers">https://github.com/roopendra/devops-interview-questions-answers</a></p>



<figure class="wp-block-embed is-type-wp-embed is-provider-techieroop wp-block-embed-techieroop"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="nuSRMkIht4"><a href="https://techieroop.com/jenkins-questions-and-answers/">Jenkins Questions and Answers</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Jenkins Questions and Answers&#8221; &#8212; TechieRoop" src="https://techieroop.com/jenkins-questions-and-answers/embed/#?secret=Un7F6oLktO#?secret=nuSRMkIht4" data-secret="nuSRMkIht4" width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<figure class="wp-block-embed is-type-wp-embed is-provider-techieroop wp-block-embed-techieroop"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="UG92355eJ4"><a href="https://techieroop.com/docker-frequently-asked-questions-and-answers/">Docker Frequently Asked Questions and Answers</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Docker Frequently Asked Questions and Answers&#8221; &#8212; TechieRoop" src="https://techieroop.com/docker-frequently-asked-questions-and-answers/embed/#?secret=Em0aPvo1Hq#?secret=UG92355eJ4" data-secret="UG92355eJ4" width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure><p>The post <a href="https://techieroop.com/top-10-devops-interview-questions/">Top 10 DevOps Interview Questions</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1340</post-id>	</item>
		<item>
		<title>Google Cloud I AM role best practices</title>
		<link>https://techieroop.com/google-cloud-i-am-role-best-practices/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=google-cloud-i-am-role-best-practices</link>
					<comments>https://techieroop.com/google-cloud-i-am-role-best-practices/#comments</comments>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Mon, 23 Jan 2023 04:40:13 +0000</pubDate>
				<category><![CDATA[GCP]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[gcp]]></category>
		<category><![CDATA[google]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1337</guid>

					<description><![CDATA[<p>Here are some best practices for using Google Cloud IAM roles:</p>
<p>The post <a href="https://techieroop.com/google-cloud-i-am-role-best-practices/">Google Cloud I AM role best practices</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Here are some best practices for using Google Cloud IAM roles:</p>



<ol class="wp-block-list">
<li>Use least privilege principle: Assign only the minimum set of permissions required to perform a task.</li>



<li>Use roles, not individual users: Assign roles to groups of users rather than assigning permissions to individual users. This makes it easier to manage and update permissions.</li>



<li>Use predefined roles: Use predefined roles, such as &#8220;Editor&#8221; or &#8220;Viewer&#8221;, instead of creating custom roles. This makes it easier to understand the level of access associated with a role.</li>



<li>Use custom roles: Create custom roles when predefined roles do not meet the specific needs of your organization.</li>



<li>Use conditional access: Use conditions, such as time of day or network location, to restrict access to resources.</li>



<li>Use audit logging: Enable audit logging to track and monitor access to resources.</li>



<li>Review permissions regularly: Review permissions regularly to ensure that they are still appropriate and revoke any permissions that are no longer needed.</li>



<li>Use service accounts for non-human access: Use service accounts for access by non-human entities, such as applications and scripts.</li>



<li>Use multi-factor authentication: Enable multi-factor authentication for sensitive resources and high-privilege roles.</li>



<li>Limit access to specific resources: Limit access to specific resources, such as specific Cloud Storage buckets or BigQuery datasets, rather than granting access to all resources.</li>
</ol><p>The post <a href="https://techieroop.com/google-cloud-i-am-role-best-practices/">Google Cloud I AM role best practices</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://techieroop.com/google-cloud-i-am-role-best-practices/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1337</post-id>	</item>
		<item>
		<title>Docker Desktop Stuck at &#8220;Kubernetes is Starting&#8221;</title>
		<link>https://techieroop.com/docker-desktop-stuck-at-kubernetes-is-starting/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=docker-desktop-stuck-at-kubernetes-is-starting</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Tue, 16 Aug 2022 16:48:05 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1332</guid>

					<description><![CDATA[<p>I came across a weird issue in Docker Desktop for windows where Kubernetes was not coming up and it stuck in &#8220;Kubernetes is Starting&#8221;. Please follow below steps to resolve [&#8230;]</p>
<p>The post <a href="https://techieroop.com/docker-desktop-stuck-at-kubernetes-is-starting/">Docker Desktop Stuck at “Kubernetes is Starting”</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>I came across a weird issue in Docker Desktop for windows where <a href="https://techieroop.com/category/kubernetes/" target="_blank" rel="noopener">Kubernetes </a>was not coming up and it stuck in &#8220;Kubernetes is Starting&#8221;.</p>



<p>Please follow below steps to resolve the issue in Windows 10 machine. </p>



<ol class="wp-block-list">
<li>Quit Docket Desktop </li>



<li>Delete the <strong>pki folder</strong>. Please find the folder in below path C:\Users\&lt;User_Name&gt;\AppData\Local\Docker\pki </li>



<li>Delete the <strong>~\.kube folde</strong>r. You can find the .kube in default user directory C:\Users\&lt;User_Name&gt;\.kube</li>



<li>Start the Docker again. </li>



<li>Open the C:\Users\&lt;User_Name&gt;\.kube\config file in text editor and replace https://kubernetes.docker.internal:6443 to https://localhost:6443</li>



<li>Restart the <strong>Docker Desktop</strong> to apply the changes.</li>
</ol>



<p><strong>Reference:</strong></p>



<p><a href="https://stackoverflow.com/questions/57711639/docker-for-windows-stuck-at-kubernetes-is-starting-after-updating-to-version-2">https://stackoverflow.com/questions/57711639/docker-for-windows-stuck-at-kubernetes-is-starting-after-updating-to-version-2</a></p><p>The post <a href="https://techieroop.com/docker-desktop-stuck-at-kubernetes-is-starting/">Docker Desktop Stuck at “Kubernetes is Starting”</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1332</post-id>	</item>
		<item>
		<title>How to update autoscale configuration in Kubernetes?</title>
		<link>https://techieroop.com/how-to-update-autoscale-configuration-in-kubernetes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-update-autoscale-configuration-in-kubernetes</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Sun, 14 Aug 2022 19:29:40 +0000</pubDate>
				<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1324</guid>

					<description><![CDATA[<p>What is autoscale in Kubernetes? Let&#8217;s understand autoscaling with an example. If you have a web application and during specific time you got lot&#8217;s of viewer and the rest of [&#8230;]</p>
<p>The post <a href="https://techieroop.com/how-to-update-autoscale-configuration-in-kubernetes/">How to update autoscale configuration in Kubernetes?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h3 class="wp-block-heading">What is autoscale in <a href="https://techieroop.com/category/kubernetes/" target="_blank" rel="noopener">Kubernetes</a>?</h3>



<p>Let&#8217;s understand autoscaling with an example. If you have a web application and during specific time you got lot&#8217;s of viewer and the rest of the day viewers are less. In order to serve the traffic load better you need more resources. Autoscaling providing you a feature to adjust load dynamically. You can define the number of minimum and maximum pods in Kubernetes cluster to serve the load.</p>



<p><strong>Prerequisites:</strong> deployment configuration </p>



<h3 class="wp-block-heading">How to update autoscale configuration in Kubernetes?</h3>



<p>1. <strong>List all autoscale configuration<br></strong>kubectl get hpa</p>



<p>2. <strong>Delete autoscale configuration. In my case I would like update the autoscale configuration for nginx-deployment<br></strong>kubectl delete hpa nginx-deployment</p>



<p><strong>3. Create autoscale configuration<br></strong>kubectl autoscale -f nginx-deployment.yaml &#8211;min=1 &#8211;max=5</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="1024" height="560" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-2.png?resize=1024%2C560&#038;ssl=1" alt="Autoscale configuration in Kubernetes  " class="wp-image-1325" srcset="https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-2.png?resize=1024%2C560&amp;ssl=1 1024w, https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-2.png?resize=300%2C164&amp;ssl=1 300w, https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-2.png?resize=768%2C420&amp;ssl=1 768w, https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-2.png?w=1032&amp;ssl=1 1032w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<p><strong>Reference: </strong></p>



<p><a href="https://kubernetes.io/blog/2016/07/autoscaling-in-kubernetes/">https://kubernetes.io/blog/2016/07/autoscaling-in-kubernetes/</a></p><p>The post <a href="https://techieroop.com/how-to-update-autoscale-configuration-in-kubernetes/">How to update autoscale configuration in Kubernetes?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1324</post-id>	</item>
		<item>
		<title>Docker Frequently Asked Questions and Answers</title>
		<link>https://techieroop.com/docker-frequently-asked-questions-and-answers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=docker-frequently-asked-questions-and-answers</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Sun, 14 Aug 2022 18:49:06 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1318</guid>

					<description><![CDATA[<p>1) How to stop all docker containers?docker kill $(docker ps -q) 2) How to stop docker containers and remove them?docker rm $(docker ps -a -q) 3) How to remove all [&#8230;]</p>
<p>The post <a href="https://techieroop.com/docker-frequently-asked-questions-and-answers/">Docker Frequently Asked Questions and Answers</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>1) How to stop all <a href="https://techieroop.com/category/docker/" target="_blank" rel="noopener">docker</a> containers?<br>docker kill $(docker ps -q)</p>



<p>2) How to stop docker containers and remove them?<br>docker rm $(docker ps -a -q)</p>



<p>3) How to remove all Docker Images?<br>docker rmi $(docker images -q)</p>



<p>4) Remove all exited containers<br><strong>List</strong>: docker ps -a -f status=exited<br><strong>Remove</strong>: docker rm $(docker ps -a -f status=exited -q)</p>



<p>5) Remove containers using more than one filter<br><strong>List</strong>: docker ps -a -f status=exited -f status=created<br><strong>Remove</strong>: docker rm $(docker ps -a -f status=exited -f status=created -q)</p>



<p>6) Remove containers according to a pattern<br><strong>List</strong>: docker ps -a | grep &#8220;pattern”<br><strong>Remove</strong>: docker ps -a | grep &#8220;pattern&#8221; | awk &#8216;{print $1}&#8217; | xargs docker rm</p>



<p>7) Remove one or more specific volumes<br><strong>List</strong>: docker volume ls<br><strong>Remove</strong>: docker volume rm volume_name</p>



<p>8) Remove dangling volumes<br><strong>List</strong>: docker volume ls -f dangling=true<br><strong>Remove</strong>: docker volume prune</p>



<p>9) Remove a container and its volume<br>docker rm -v container_name</p><p>The post <a href="https://techieroop.com/docker-frequently-asked-questions-and-answers/">Docker Frequently Asked Questions and Answers</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1318</post-id>	</item>
		<item>
		<title>denied: requested access to the resource is denied</title>
		<link>https://techieroop.com/denied-requested-access-to-the-resource-is-denied/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=denied-requested-access-to-the-resource-is-denied</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Sun, 14 Aug 2022 17:48:56 +0000</pubDate>
				<category><![CDATA[Docker]]></category>
		<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1314</guid>

					<description><![CDATA[<p>denied: requested access to the resource is denied If you face this error while pushing image to remote docker registry then you can use below solution to fix the issue. [&#8230;]</p>
<p>The post <a href="https://techieroop.com/denied-requested-access-to-the-resource-is-denied/">denied: requested access to the resource is denied</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2 class="wp-block-heading">denied: requested access to the resource is denied</h2>



<p>If you face this error while pushing image to remote <a href="https://techieroop.com/category/docker/" target="_blank" rel="noopener">docker </a>registry then you can use below solution to fix the issue. </p>



<p></p>



<p>In my case, I have created few images and I was trying to push those images in remote docker repository but I was getting this issue. </p>



<p>I came across below solution to fix this issue</p>



<ul class="wp-block-list"><li>Login in Docker Hub account in command line</li></ul>



<p>            docker login -u techieroop</p>



<ul class="wp-block-list"><li>Tag your image build</li></ul>



<pre class="wp-block-code"><code>      docker tag ab_entrypoint:latest techieroop/devops:ab
      <strong>ab_entrypoint</strong> : Local image and default tag is latest
      <strong>techieroop</strong>: Docker hub username 
      <strong>devops</strong>: Docker hub public repository
</code></pre>



<ul class="wp-block-list"><li>Pushed the image to your private docker repository</li></ul>



<pre class="wp-block-code"><code>      docker push techieroop/devops:ab</code></pre>



<figure class="wp-block-image size-full"><a href="https://techieroop.com"><img data-recalc-dims="1" loading="lazy" decoding="async" width="768" height="177" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image.png?resize=768%2C177&#038;ssl=1" alt="" class="wp-image-1315" srcset="https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image.png?w=768&amp;ssl=1 768w, https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image.png?resize=300%2C69&amp;ssl=1 300w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a></figure>



<p></p>



<figure class="wp-block-image size-full"><a href="https://techieroop.com"><img data-recalc-dims="1" loading="lazy" decoding="async" width="936" height="266" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-1.png?resize=936%2C266&#038;ssl=1" alt="" class="wp-image-1316" srcset="https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-1.png?w=936&amp;ssl=1 936w, https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-1.png?resize=300%2C85&amp;ssl=1 300w, https://i0.wp.com/techieroop.com/wp-content/uploads/2022/08/image-1.png?resize=768%2C218&amp;ssl=1 768w" sizes="auto, (max-width: 936px) 100vw, 936px" /></a></figure>



<p><strong>Reference:</strong></p>



<p><a href="https://docs.docker.com/engine/reference/commandline/push/">https://docs.docker.com/engine/reference/commandline/push/</a></p><p>The post <a href="https://techieroop.com/denied-requested-access-to-the-resource-is-denied/">denied: requested access to the resource is denied</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1314</post-id>	</item>
		<item>
		<title>How to concatenate string variables in Bash</title>
		<link>https://techieroop.com/how-to-concatenate-string-variables-in-bash/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-concatenate-string-variables-in-bash</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Thu, 23 Sep 2021 18:46:14 +0000</pubDate>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash scripting]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell script]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1297</guid>

					<description><![CDATA[<p>Here are few preferred ways to concatenate string variables in bash script Concatenate string variables in Bash 1.Write the variable one after another in echo 2. Use += assignment operator: Second [&#8230;]</p>
<p>The post <a href="https://techieroop.com/how-to-concatenate-string-variables-in-bash/">How to concatenate string variables in Bash</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image"><figure class="aligncenter size-full is-resized"><a href="https://techieroop.com/how-to-concatenate-string-variables-in-bash/"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2021/09/How-to-concatenate-string-variables-in-Bash.png?resize=410%2C231&#038;ssl=1" alt="How to concatenate string variables in Bash" class="wp-image-1298" width="410" height="231"/></a></figure></div>



<p>Here are few preferred ways to concatenate string variables in bash script</p>



<h2 class="wp-block-heading">Concatenate string variables in Bash</h2>



<h4 class="wp-block-heading">1.Write the variable one after another in echo </h4>



<pre class="wp-block-code"><code>#!/bin/bash
var1="Techieroop"
var2="${var1} Tutorial"
echo "${var2}"
##output
Techieroop Tutorial</code></pre>



<h4 class="wp-block-heading">2. Use <code><strong>+=</strong></code> assignment operator:</h4>



<pre class="wp-block-code"><code>#!/bin/bash
var="Techieroop"
var+=" Tutorial"
echo "$var"

##output
Techieroop Tutorial

</code></pre>



<p>Second method can be used to append to an integer as well</p>



<p>test.sh</p>



<pre class="wp-block-code"><code>#!/bin/bash
int1=18
((int1+=86))
echo "Sum is $int1"

#$ sh test.sh
#Sum is 104</code></pre>


<div class="taxonomy-post_tag wp-block-post-terms"><a href="https://techieroop.com/tag/bash-scripting/" rel="tag">bash scripting</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/devops/" rel="tag">DevOps</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/linux-2/" rel="tag">linux</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/scripting/" rel="tag">scripting</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/shell/" rel="tag">shell</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/shell-script/" rel="tag">shell script</a></div>


<p></p><p>The post <a href="https://techieroop.com/how-to-concatenate-string-variables-in-bash/">How to concatenate string variables in Bash</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1297</post-id>	</item>
		<item>
		<title>How to check if a string contains a substring in Bash</title>
		<link>https://techieroop.com/how-to-check-if-a-string-contains-a-substring-in-bash/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-check-if-a-string-contains-a-substring-in-bash</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Thu, 23 Sep 2021 18:20:19 +0000</pubDate>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash scripting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell script]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1293</guid>

					<description><![CDATA[<p>Here are the couple of methods to check if a string contains a substring in bash shell script. Methods to check if string contains a substring in Bash Method 1: [&#8230;]</p>
<p>The post <a href="https://techieroop.com/how-to-check-if-a-string-contains-a-substring-in-bash/">How to check if a string contains a substring in Bash</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image"><figure class="aligncenter size-full is-resized"><a href="https://techieroop.com/how-to-check-if-a-string-contains-a-substring-in-bash/"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2021/09/How-to-check-if-a-string-contains-a-substring-in-Bash.png?resize=584%2C281&#038;ssl=1" alt="How to check if a string contains a substring in Bash" class="wp-image-1294" width="584" height="281"/></a></figure></div>



<p>Here are the couple of methods to check if a string contains a substring in bash shell script. </p>



<h3 class="wp-block-heading">Methods to check if string contains a substring in Bash</h3>



<p>Method 1: Use regular expression </p>



<pre class="wp-block-code"><code>#!/bin/bash
str='Techieroop: Solution for DevOps &amp; Open Source Technology'
if &#91;&#91; $str =~ "DevOps" ]]; then
  echo "String is there!"
else
  echo "String is not there"
fi</code></pre>



<p>Output:</p>



<pre class="wp-block-code"><code>String is there!</code></pre>



<p>Method 2: Use wildcard (*) to check the string </p>



<pre class="wp-block-code"><code>#!/bin/bash
str='Techieroop: Solution for DevOps &amp; Open Source Technology'
if &#91;&#91; $str == *"DevOps"* ]]; then
  echo "String is there!"
else
  echo "String is not there"
fi</code></pre>



<p>Output:</p>



<pre class="wp-block-code"><code>String is there!</code></pre>


<div class="taxonomy-post_tag wp-block-post-terms"><a href="https://techieroop.com/tag/bash-scripting/" rel="tag">bash scripting</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/linux-2/" rel="tag">linux</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/scripting/" rel="tag">scripting</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/shell/" rel="tag">shell</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/shell-script/" rel="tag">shell script</a></div><p>The post <a href="https://techieroop.com/how-to-check-if-a-string-contains-a-substring-in-bash/">How to check if a string contains a substring in Bash</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1293</post-id>	</item>
		<item>
		<title>How to automate bash profile deployment in ansible ?</title>
		<link>https://techieroop.com/how-to-automate-bashrc-file-deployment-in-ansible/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-automate-bashrc-file-deployment-in-ansible</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Sun, 19 Sep 2021 11:59:12 +0000</pubDate>
				<category><![CDATA[Ansible]]></category>
		<category><![CDATA[ansible-playbook]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1284</guid>

					<description><![CDATA[<p>If you dealing with number of servers in day to day basis and if your application is growing rapidly then you may come across with different environment variable which you [&#8230;]</p>
<p>The post <a href="https://techieroop.com/how-to-automate-bashrc-file-deployment-in-ansible/">How to automate bash profile deployment in ansible ?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image"><figure class="aligncenter size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2021/09/how-to-automate-bashrc-file-in-ansible.png?resize=374%2C166&#038;ssl=1" alt="how to automate bashrc file in ansible" class="wp-image-1289" width="374" height="166"/></figure></div>



<p>If you dealing with number of servers in day to day basis and if your application is growing rapidly then you may come across with different environment variable which you have to update manually bashrc files. What if you have 10+ environment then it will difficult for you to update the bash profile file manually. </p>



<h2 class="wp-block-heading">How to automate bashrc file deployment?</h2>



<p>You can automate your bash profile deployment using Ansible. Here is my preferred way to achieve this. </p>



<p><strong>Method 1: </strong></p>



<ol class="wp-block-list"><li>Create separate inventory files file each environment.</li><li>Create a ansible role to manage all bashrc files related task. </li><li>Keep all environment specific configuration in inventory vars.  </li><li>Create template if you have fixed set of variable and write the bashc file based on the environment.</li><li>Write down all back file and deployment tasks in tasks/main.yaml.</li></ol>



<p>Method 2: </p>



<ol class="wp-block-list"><li>Create separate inventory file for each environment </li><li>Create a separate role in Ansible . eg. bashrcdeployment</li><li>Save all environment users config in roles/bashrcdeployment/files/main.yaml. e.g PROD/user1/.bashrc_profile , /PROD/user2/.bashrc_profile</li><li>In roles/bashrcdeployment/default/main.yaml section, keep all environment and users details. </li><li>Write down all back and deployment tasks in roles/bashrcdeployment/tasks/main.yaml</li></ol>


<div class="taxonomy-post_tag wp-block-post-terms"><a href="https://techieroop.com/tag/ansible/" rel="tag">Ansible</a><span class="wp-block-post-terms__separator">, </span><a href="https://techieroop.com/tag/ansible-playbook/" rel="tag">ansible-playbook</a></div><p>The post <a href="https://techieroop.com/how-to-automate-bashrc-file-deployment-in-ansible/">How to automate bash profile deployment in ansible ?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1284</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced (Page is feed) 
Lazy Loading (feed)
Minified using Disk
Database Caching 1/114 queries in 0.020 seconds using Disk

Served from: techieroop.com @ 2026-05-03 09:27:15 by W3 Total Cache
-->