<?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>Devops Archives - Linuxcent</title>
	<atom:link href="https://linuxcent.com/category/devops/feed/" rel="self" type="application/rss+xml" />
	<link>https://linuxcent.com/category/devops/</link>
	<description>Infrastructure security, from the kernel up.</description>
	<lastBuildDate>Sat, 28 Feb 2026 17:46:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://linuxcent.com/wp-content/uploads/2026/04/favicon-512x512-1-150x150.png</url>
	<title>Devops Archives - Linuxcent</title>
	<link>https://linuxcent.com/category/devops/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">211632295</site>	<item>
		<title>EKS 1.33 Upgrade Blocker: Fixing Dead Nodes &#038; NetworkManager on Rocky Linux</title>
		<link>https://linuxcent.com/eks-1-33-networkmanager-systemd-networkd-migration-fix/</link>
					<comments>https://linuxcent.com/eks-1-33-networkmanager-systemd-networkd-migration-fix/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Tue, 17 Feb 2026 19:42:18 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Devops]]></category>
		<category><![CDATA[Linux Tutorials]]></category>
		<category><![CDATA[SRE]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[AMI Build]]></category>
		<category><![CDATA[AWS EKS]]></category>
		<category><![CDATA[AWS networking]]></category>
		<category><![CDATA[cloud-init]]></category>
		<category><![CDATA[CoreDNS]]></category>
		<category><![CDATA[Kubernetes 1.33]]></category>
		<category><![CDATA[NetworkManager]]></category>
		<category><![CDATA[Packer]]></category>
		<category><![CDATA[resolv.conf]]></category>
		<category><![CDATA[Rocky Linux EKS]]></category>
		<category><![CDATA[systemd-networkd]]></category>
		<category><![CDATA[systemd-networkd migration]]></category>
		<category><![CDATA[systemd-resolved]]></category>
		<category><![CDATA[VPC]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=1400</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 5</span> <span class="rt-label rt-postfix">minutes</span></span>The EKS 1.33+ NetworkManager Trap: A Complete systemd-networkd Migration Guide for Rocky &#038; Alma Linux TL;DR: The Blocker: Upgrading to EKS 1.33+ is breaking worker nodes, especially on free community distributions like Rocky Linux and AlmaLinux. Boot times are spiking past 6 minutes, and nodes are failing to get IPs. The Root Cause: AWS is ... <a title="EKS 1.33 Upgrade Blocker: Fixing Dead Nodes &#038; NetworkManager on Rocky Linux" class="read-more" href="https://linuxcent.com/eks-1-33-networkmanager-systemd-networkd-migration-fix/" aria-label="Read more about EKS 1.33 Upgrade Blocker: Fixing Dead Nodes &#038; NetworkManager on Rocky Linux">Read more</a></p>
<p>The post <a href="https://linuxcent.com/eks-1-33-networkmanager-systemd-networkd-migration-fix/">EKS 1.33 Upgrade Blocker: Fixing Dead Nodes &#038; NetworkManager on Rocky Linux</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 5</span> <span class="rt-label rt-postfix">minutes</span></span><h1>The EKS 1.33+ NetworkManager Trap: A Complete systemd-networkd Migration Guide for Rocky &#038; Alma Linux</h1>
<h2>TL;DR:</h2>
<ul>
<li><strong>The Blocker:</strong> Upgrading to EKS 1.33+ is breaking worker nodes, especially on free community distributions like Rocky Linux and AlmaLinux. Boot times are spiking past 6 minutes, and nodes are failing to get IPs.</li>
<li><strong>The Root Cause:</strong> AWS is deprecating <code class="" data-line="">NetworkManager</code> in favor of <code class="" data-line="">systemd-networkd</code>. However, ripping out NetworkManager can leave stale VPC IPs in <code class="" data-line="">/etc/resolv.conf</code>. Combined with the <code class="" data-line="">systemd-resolved</code> stub listener (<code class="" data-line="">127.0.0.53</code>) and a few configuration missteps, it causes a total internal DNS collapse where CoreDNS pods crash and burn.</li>
<li><strong>The Subtext:</strong> AWS is pushing this modern networking standard hard. Subtly, this acts as a major drawback for Rocky/Alma AMIs, silently steering frustrated engineers toward Amazon Linux 2023 (AL2023) as the &#8220;easy&#8221; way out.</li>
<li><strong>The &#8220;Super Hack&#8221;:</strong> Automate the clean removal of NetworkManager, bypass the DNS stub listener by symlinking <code class="" data-line="">/etc/resolv.conf</code> directly to the <code class="" data-line="">systemd</code> uplink, and enforce strict state validation during the AMI build.</li>
</ul>
<hr>
<p>If you’ve been in the DevOps and SRE space long enough, you know that vendor upgrades rarely go exactly as planned. But lately, if you are running enterprise Linux distributions like Rocky Linux or AlmaLinux on AWS EKS, you might have noticed the ground silently shifting beneath your feet.</p>
<p>With the push to EKS 1.33+, AWS is mandating a shift toward modern, cloud-native networking standards. Specifically, they are phasing out the legacy <code class="" data-line="">NetworkManager</code> in favor of <code class="" data-line="">systemd-networkd</code>.</p>
<p>While this makes sense on paper, the transition for community distributions has been incredibly painful. AWS support couldn&#8217;t resolve our issues, and my SRE team had practically given up, officially halting our EKS upgrade process. It’s hard not to notice that this massive, undocumented friction in Rocky Linux and AlmaLinux conveniently positions AWS&#8217;s own Amazon Linux 2023 (AL2023) as the path of least resistance.</p>
<p>I’m hoping the incredible maintainers at free distributions like Rocky Linux and AlmaLinux take note of this architectural shift. But until the official AMIs catch up, we have to fix it ourselves. Here is the exact breakdown of the cascading failure that brought our clusters to their knees, and the &#8220;super hack&#8221; script we used to fix it.</p>
<h2>The Investigation: A Cascading SRE Failure</h2>
<p>When our EKS 1.33+ worker nodes started booting with 6+ minute latencies or outright failing to join the cluster, I pulled apart our Rocky Linux AMIs to monitor the network startup sequence. What I found was a classic cascading failure of services, stale data, and human error.</p>
<h3>Step 1: The Race Condition</h3>
<p>Initially, the problem was a violent tug-of-war. <code class="" data-line="">NetworkManager</code> was not correctly disabled by default, and <code class="" data-line="">cloud-init</code> was still trying to invoke it. This conflicted directly with <code class="" data-line="">systemd-networkd</code>, paralyzing the network stack during boot. To fix this, we initially disabled the <code class="" data-line="">NetworkManager</code> service and removed it from <code class="" data-line="">cloud-init</code>.</p>
<h3>Step 2: The Stale Data Landmine</h3>
<p>Here is where the trap snapped shut. Because <code class="" data-line="">NetworkManager</code> was historically the primary service responsible for dynamically generating and updating <code class="" data-line="">/etc/resolv.conf</code>, completely disabling it stopped that file from being updated.</p>
<p>When we baked the new AMI via Packer, <code class="" data-line="">/etc/resolv.conf</code> was orphaned and preserved the old configuration—specifically, a stale <code class="" data-line="">.2</code> VPC IP address from the temporary subnet where the AMI build ran.</p>
<h3>Step 3: The Human Element</h3>
<p>We&#8217;ve all been there: during a stressful outage, wires get crossed. While troubleshooting the dead nodes, one of our SREs mistakenly stopped the <code class="" data-line="">systemd-resolved</code> service entirely, thinking it was conflicting with something else.</p>
<h3>Step 4: Total DNS Collapse</h3>
<p>When the new AMI booted up and joined the EKS node group, the environment was a disaster zone:</p>
<ol>
<li><code class="" data-line="">NetworkManager</code> was dead (intentional).</li>
<li><code class="" data-line="">systemd-resolved</code> was stopped (accidental).</li>
<li><code class="" data-line="">/etc/resolv.conf</code> contained a dead, stale IP address from a completely different subnet.</li>
</ol>
<p>When <code class="" data-line="">kubelet</code> started, it dutifully read the host&#8217;s broken <code class="" data-line="">/etc/resolv.conf</code> and passed it up to CoreDNS. CoreDNS attempted to route traffic to the stale IP, failed, and started crash-looping. Internal DNS resolution (<code class="" data-line="">pod.namespace.svc.cluster.local</code>) totally collapsed. The cluster was dead in the water.</p>
<figure class="wp-block-image size-large">
<img fetchpriority="high" decoding="async" src="[https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-EKS-Cascading-Failure.jpg](https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-EKS-Cascading-Failure.jpg)" alt="Flowchart showing the cascading DNS failure in EKS worker nodes" width="221" height="661" class="alignnone size-full wp-image-1410" srcset="https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-EKS-Cascading-Failure.jpg 221w, https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-EKS-Cascading-Failure-100x300.jpg 100w" sizes="(max-width: 221px) 100vw, 221px" /><figcaption>The perfect storm: How stale data and disabled services led to a total CoreDNS collapse.</figcaption><hr>
<h2>Linux Internals: How systemd Manages DNS (And Why CoreDNS Breaks)</h2>
<p>To understand how to permanently fix this, we need to look at how <code class="" data-line="">systemd</code> actually handles DNS under the hood. When using <code class="" data-line="">systemd-networkd</code>, <code class="" data-line="">resolv.conf</code> management is handled through a strict partnership with <code class="" data-line="">systemd-resolved</code>. </p>
<figure class="wp-block-image size-large">
<img decoding="async" src="[https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-Page-2-1024x299.jpg](https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-Page-2-1024x299.jpg)" alt="Architecture diagram of systemd-networkd and systemd-resolved D-Bus communication" width="1024" height="299" class="alignnone size-large wp-image-1411" srcset="https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-Page-2-1024x299.jpg 1024w, https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-Page-2-300x87.jpg 300w, https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-Page-2-768x224.jpg 768w, https://linuxcent.com/wp-content/uploads/2026/02/Untitled-Diagram-Page-2.jpg 1101w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>How systemd collects network data and the critical symlink choice that dictates EKS DNS health.</figcaption><p>Here is how the flow works: <code class="" data-line="">systemd-networkd</code> collects network and DNS information (from DHCP, Router Advertisements, or static configs) and pushes it to <code class="" data-line="">systemd-resolved</code> via D-Bus. To manage your DNS resolution effectively, you must configure the <code class="" data-line="">/etc/resolv.conf</code> symbolic link to match your desired mode of operation. You have three choices:</p>
<h3>1. The &#8220;Recommended&#8221; Local DNS Stub (The EKS Killer)</h3>
<p>By default, systemd recommends using <code class="" data-line="">systemd-resolved</code> as a local DNS cache and manager, providing features like DNS-over-TLS and mDNS.</p>
<ul>
<li><strong>The Symlink:</strong> <code class="" data-line="">ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf</code></li>
<li><strong>Contents:</strong> Points to <code class="" data-line="">127.0.0.53</code> as the only nameserver.</li>
<li><strong>The Problem:</strong> This is a disaster for Kubernetes. If Kubelet passes <code class="" data-line="">127.0.0.53</code> to CoreDNS, CoreDNS queries its own loopback interface inside the pod network namespace, blackholing all cluster DNS.</li>
</ul>
<h3>2. Direct Uplink DNS (The &#8220;Super Hack&#8221; Solution)</h3>
<p>This mode bypasses the local stub entirely. The system lists the actual upstream DNS servers (e.g., your AWS VPC nameservers) discovered by <code class="" data-line="">systemd-networkd</code> directly in the file.</p>
<ul>
<li><strong>The Symlink:</strong> <code class="" data-line="">ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf</code></li>
<li><strong>Contents:</strong> Lists all actual VPC DNS servers currently known to <code class="" data-line="">systemd-resolved</code>.</li>
<li><strong>The Benefit:</strong> CoreDNS gets the real AWS VPC nameservers, allowing it to route external queries correctly while managing internal cluster resolution perfectly.</li>
</ul>
<h3>3. Static Configuration (Manual)</h3>
<p>If you want to manage DNS manually without systemd modifying the file, you break the symlink and create a regular file (<code class="" data-line="">rm /etc/resolv.conf</code>). While <code class="" data-line="">systemd-networkd</code> still receives DNS info from DHCP, it won&#8217;t touch this file. (Not ideal for dynamic cloud environments).</p>
<hr>
<h2>The Solution: A Surgical systemd Cutover</h2>
<p>Knowing the internals, the path forward is clear. We needed to not only remove the legacy stack but explicitly rewire the DNS resolution to the <strong>Direct Uplink</strong> to prevent the stale data trap and bypass the notorious <code class="" data-line="">127.0.0.53</code> stub listener.</p>
<p>Here is the exact state we achieved:</p>
<ol>
<li><strong>Lock down <code class="" data-line="">cloud-init</code></strong> so it stops triggering legacy network services.</li>
<li><strong>Completely mask <code class="" data-line="">NetworkManager</code></strong> to ensure it never wakes up.</li>
<li><strong>Ensure <code class="" data-line="">systemd-resolved</code> is enabled and running</strong>, but with the <code class="" data-line="">DNSStubListener</code> explicitly disabled (<code class="" data-line="">DNSStubListener=no</code>) so it doesn&#8217;t conflict with anything.</li>
<li><strong>Destroy the stale <code class="" data-line="">/etc/resolv.conf</code></strong> and create a symlink to the <strong>Direct Uplink</strong> (<code class="" data-line="">ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf</code>).</li>
<li><strong>Reconfigure and restart <code class="" data-line="">systemd-networkd</code></strong>.</li>
</ol>
<blockquote><p>
<strong>Pro-Tip for Debugging:</strong> To ensure <code class="" data-line="">systemd-networkd</code> is successfully pushing DNS info to the resolver, verify your <code class="" data-line="">.network</code> files in <code class="" data-line="">/etc/systemd/network/</code>. Ensure <code class="" data-line="">UseDNS=yes</code> (which is the default) is set in the <code class="" data-line="">[DHCPv4]</code> section. You can always run <code class="" data-line="">resolvectl status</code> to see exactly which DNS servers are currently assigned to each interface over D-Bus!
</p></blockquote>
<h2>The Automation: Production AMI Prep Script</h2>
<p>Manual hacks are great for debugging, but SRE is about repeatable automation. We&#8217;ve open-sourced the <code class="" data-line="">eks-production-ami-prep.sh</code> script to handle this cutover automatically during your Packer or Image Builder pipeline. It standardizes the cutover, wipes out the stale data, and includes a strict validation suite.</p>
<div class="wp-block-buttons">
<div class="wp-block-button"><a class="wp-block-button__link" href="//github.com/rrskris/NetworkManager-systemd-networkd-config/blob/main/eks-production-ami-prep.sh" target="_blank" rel="noreferrer noopener">View Migration Script on GitHub</a></div>
</div>
<p></br></p>
<h2>The Results</h2>
<p>By actively taking control of the <code class="" data-line="">systemd</code> stack and ensuring <code class="" data-line="">/etc/resolv.conf</code> was dynamically linked rather than statically abandoned, we completely unblocked our EKS 1.33+ upgrade.</p>
<p>More impressively, <strong>our system bootup time dropped from a crippling 6+ minutes down to under 2 minutes.</strong> We shouldn&#8217;t have to abandon fantastic, free enterprise distributions just because a cloud provider shifts their networking paradigm. If your team is struggling with AWS EKS upgrades on Rocky Linux or AlmaLinux, integrate this automation into your pipeline and get your clusters back in the fast lane.</p>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Feks-1-33-networkmanager-systemd-networkd-migration-fix%2F&amp;linkname=EKS%201.33%20Upgrade%20Blocker%3A%20Fixing%20Dead%20Nodes%20%26%20NetworkManager%20on%20Rocky%20Linux" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Feks-1-33-networkmanager-systemd-networkd-migration-fix%2F&amp;linkname=EKS%201.33%20Upgrade%20Blocker%3A%20Fixing%20Dead%20Nodes%20%26%20NetworkManager%20on%20Rocky%20Linux" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Feks-1-33-networkmanager-systemd-networkd-migration-fix%2F&amp;linkname=EKS%201.33%20Upgrade%20Blocker%3A%20Fixing%20Dead%20Nodes%20%26%20NetworkManager%20on%20Rocky%20Linux" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Feks-1-33-networkmanager-systemd-networkd-migration-fix%2F&amp;linkname=EKS%201.33%20Upgrade%20Blocker%3A%20Fixing%20Dead%20Nodes%20%26%20NetworkManager%20on%20Rocky%20Linux" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Feks-1-33-networkmanager-systemd-networkd-migration-fix%2F&amp;linkname=EKS%201.33%20Upgrade%20Blocker%3A%20Fixing%20Dead%20Nodes%20%26%20NetworkManager%20on%20Rocky%20Linux" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Feks-1-33-networkmanager-systemd-networkd-migration-fix%2F&amp;linkname=EKS%201.33%20Upgrade%20Blocker%3A%20Fixing%20Dead%20Nodes%20%26%20NetworkManager%20on%20Rocky%20Linux" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Feks-1-33-networkmanager-systemd-networkd-migration-fix%2F&amp;linkname=EKS%201.33%20Upgrade%20Blocker%3A%20Fixing%20Dead%20Nodes%20%26%20NetworkManager%20on%20Rocky%20Linux" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Feks-1-33-networkmanager-systemd-networkd-migration-fix%2F&#038;title=EKS%201.33%20Upgrade%20Blocker%3A%20Fixing%20Dead%20Nodes%20%26%20NetworkManager%20on%20Rocky%20Linux" data-a2a-url="https://linuxcent.com/eks-1-33-networkmanager-systemd-networkd-migration-fix/" data-a2a-title="EKS 1.33 Upgrade Blocker: Fixing Dead Nodes &amp; NetworkManager on Rocky Linux"></a></p><p>The post <a href="https://linuxcent.com/eks-1-33-networkmanager-systemd-networkd-migration-fix/">EKS 1.33 Upgrade Blocker: Fixing Dead Nodes &#038; NetworkManager on Rocky Linux</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/eks-1-33-networkmanager-systemd-networkd-migration-fix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1400</post-id>	</item>
		<item>
		<title>Implementing ILM with Write Aliases (Logstash + Elasticsearch)</title>
		<link>https://linuxcent.com/implementing-ilm-with-write-aliases-logstash-elasticsearch/</link>
					<comments>https://linuxcent.com/implementing-ilm-with-write-aliases-logstash-elasticsearch/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 13 Aug 2025 08:29:29 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=1379</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span>In this blog post, I demonstrate the creation of a new elasticsearch index with the ability to rollover using the aliases. We will be implementing the ILM (Information lifecycle Management) in Elasticsearch with Logstash Using Write Aliases Optimize Elasticsearch indexing with a clean, reliable setup: use Index Lifecycle Management (ILM) with a dedicated write alias, ... <a title="Implementing ILM with Write Aliases (Logstash + Elasticsearch)" class="read-more" href="https://linuxcent.com/implementing-ilm-with-write-aliases-logstash-elasticsearch/" aria-label="Read more about Implementing ILM with Write Aliases (Logstash + Elasticsearch)">Read more</a></p>
<p>The post <a href="https://linuxcent.com/implementing-ilm-with-write-aliases-logstash-elasticsearch/">Implementing ILM with Write Aliases (Logstash + Elasticsearch)</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span><p>In this blog post, I demonstrate the creation of a new elasticsearch index with the ability to rollover using the aliases. </p>
<p>We will be implementing the ILM (Information lifecycle Management) in Elasticsearch with Logstash Using Write Aliases</p>
<p>Optimize Elasticsearch indexing with a clean, reliable setup: use Index Lifecycle Management (ILM) with a dedicated write alias, let Elasticsearch handle rollovers, and keep Logstash writing to the alias instead of hardcoded index names. This approach improves stability, reduces manual ops, and scales cleanly as log volume grows.</p>
<h1>Implementing ILM with Write Aliases (Logstash + Elasticsearch)</h1>
<p>Optimize Elasticsearch indexing with a clean, reliable setup: use <strong>Index Lifecycle Management (ILM)</strong> with a dedicated write alias, let Elasticsearch handle rollovers, and keep Logstash writing to the alias instead of hardcoded index names. This approach improves stability, reduces manual operations, and scales cleanly as log volume grows.</p>
<h2>What you’ll set up</h2>
<ul>
<li>Write to a single write alias.</li>
<li>Apply ILM via an index template with a rollover alias.</li>
<li>Bootstrap the first index with the alias marked as <code class="" data-line="">is_write_index:true</code>.</li>
<li>Point Logstash at <code class="" data-line="">ilm_rollover_alias</code> (not a date-based index).</li>
</ul>
<h2>Prerequisites</h2>
<ul>
<li>Elasticsearch with ILM enabled.</li>
<li>Logstash connected to Elasticsearch.</li>
<li>An ILM policy (example: <code class="" data-line="">es_policy01</code>).</li>
</ul>
<h2>1) Create index template with rollover alias</h2>
<p>Define a template that applies the ILM policy and the alias all indices will use.</p>
<pre><code class="" data-line="">PUT _index_template/test-vks
{
  &quot;index_patterns&quot;: [&quot;vks-nginx-*&quot;],
  &quot;priority&quot;: 691,
  &quot;template&quot;: {
    &quot;settings&quot;: {
      &quot;index&quot;: {
        &quot;lifecycle&quot;: {
          &quot;name&quot;: &quot;es_policy01&quot;,
          &quot;rollover_alias&quot;: &quot;vks-nginx-write-alias&quot;
        },
        &quot;number_of_shards&quot;: 1,
        &quot;number_of_replicas&quot;: 0
      }
    },
    &quot;mappings&quot;: {
      &quot;dynamic&quot;: &quot;runtime&quot;
    }
  }
}
</code></pre>
<p><strong>Notes:</strong></p>
<ul>
<li>Only set <code class="" data-line="">index.lifecycle.rollover_alias</code> here; do not declare the alias body in the template.</li>
<li>Tune shards/replicas for your cluster and retention goals.</li>
</ul>
<h2>2) Bootstrap the first index</h2>
<p>Create the first managed index and bind the write alias to it.</p>
<pre><code class="" data-line="">PUT /&lt;vks-nginx-error-{now/d}-000001&gt;
{
  &quot;aliases&quot;: {
    &quot;vks-nginx-write-alias&quot;: {
      &quot;is_write_index&quot;: true
    }
  }
}
</code></pre>
<p><strong>Notes:</strong></p>
<ul>
<li>The <code class="" data-line="">-000001</code> suffix is required for rollover sequencing.</li>
<li><code class="" data-line="">is_write_index:true</code> tells Elasticsearch where new writes should go.</li>
</ul>
<h2>3) Configure Logstash to use the write alias</h2>
<p>Point Logstash to the rollover alias and avoid hardcoding an index name.</p>
<pre><code class="" data-line="">output {
  elasticsearch {
    hosts =&gt; [&quot;http://localhost:9200&quot;]
    manage_template =&gt; false
    template_name   =&gt; &quot;test-vks&quot;
    # index =&gt; &quot;vks-nginx-error-%{+YYYY.MM.dd}&quot;   # keep commented when using ILM
    ilm_rollover_alias =&gt; &quot;vks-nginx-write-alias&quot;
  }
}
</code></pre>
<p><strong>Notes:</strong></p>
<ul>
<li><code class="" data-line="">manage_template =&gt; false</code> prevents Logstash from overwriting your Elasticsearch template.</li>
<li>Restart Logstash after changes.</li>
</ul>
<h2>How rollover works</h2>
<ul>
<li>When ILM conditions are met, Elasticsearch creates the next index (<code class="" data-line="">...-000002</code>), moves the write alias to it, and keeps previous indices searchable.</li>
<li>Reads via the alias cover all indices it targets; writes always land on the active write index.</li>
</ul>
<h2>Common issues and quick fixes</h2>
<ul>
<li><strong>rollover_alias missing:</strong> Ensure <code class="" data-line="">index.lifecycle.rollover_alias</code> is set in the template and matches the alias used in bootstrap and Logstash.</li>
<li><strong>Docs landing in the wrong index:</strong> Remove <code class="" data-line="">index</code> in Logstash; use only <code class="" data-line="">ilm_rollover_alias</code>.</li>
<li><strong>Alias conflicts on rollover:</strong> Don’t embed the alias body in the template—bind it during the bootstrap call only.</li>
</ul>
<figure id="attachment_1383" aria-describedby="caption-attachment-1383" style="width: 1014px" class="wp-caption alignnone"><img decoding="async" src="https://linuxcent.com/wp-content/uploads/2025/08/Write-Index-Alias-1024x1020.png" alt="Complete Flow of Implementing ILM with Write Aliases (Logstash + Elasticsearch)" width="1024" height="1020" class="size-large wp-image-1383" srcset="https://linuxcent.com/wp-content/uploads/2025/08/Write-Index-Alias-1024x1020.png 1024w, https://linuxcent.com/wp-content/uploads/2025/08/Write-Index-Alias-300x300.png 300w, https://linuxcent.com/wp-content/uploads/2025/08/Write-Index-Alias-150x150.png 150w, https://linuxcent.com/wp-content/uploads/2025/08/Write-Index-Alias-768x765.png 768w, https://linuxcent.com/wp-content/uploads/2025/08/Write-Index-Alias.png 1328w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption id="caption-attachment-1383" class="wp-caption-text">Implementing ILM with Write Aliases (Logstash + Elasticsearch)</figcaption></figure>
<h2>Quick checklist</h2>
<ul>
<li>ILM policy exists (e.g., <code class="" data-line="">es_policy01</code>).</li>
<li>Template includes <code class="" data-line="">index.lifecycle.name</code> and <code class="" data-line="">index.lifecycle.rollover_alias</code>.</li>
<li>First index created with <code class="" data-line="">-000001</code> and <code class="" data-line="">is_write_index:true</code>.</li>
<li>Logstash writes to the alias (no concrete index).</li>
<li>Logstash restarted and ILM verified.</li>
</ul>
</ul>
<h2>Verify your setup (optional)</h2>
<p>Run these in Kibana Dev Tools or via curl:</p>
<pre><code class="" data-line="">GET _ilm/policy/es_policy01 GET _index_template/test-vks GET vks-nginx-write-alias/_alias POST /vks-nginx-write-alias/_rollover # non-prod/manual test </code></pre>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fimplementing-ilm-with-write-aliases-logstash-elasticsearch%2F&amp;linkname=Implementing%20ILM%20with%20Write%20Aliases%20%28Logstash%20%2B%20Elasticsearch%29" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fimplementing-ilm-with-write-aliases-logstash-elasticsearch%2F&amp;linkname=Implementing%20ILM%20with%20Write%20Aliases%20%28Logstash%20%2B%20Elasticsearch%29" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fimplementing-ilm-with-write-aliases-logstash-elasticsearch%2F&amp;linkname=Implementing%20ILM%20with%20Write%20Aliases%20%28Logstash%20%2B%20Elasticsearch%29" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fimplementing-ilm-with-write-aliases-logstash-elasticsearch%2F&amp;linkname=Implementing%20ILM%20with%20Write%20Aliases%20%28Logstash%20%2B%20Elasticsearch%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fimplementing-ilm-with-write-aliases-logstash-elasticsearch%2F&amp;linkname=Implementing%20ILM%20with%20Write%20Aliases%20%28Logstash%20%2B%20Elasticsearch%29" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fimplementing-ilm-with-write-aliases-logstash-elasticsearch%2F&amp;linkname=Implementing%20ILM%20with%20Write%20Aliases%20%28Logstash%20%2B%20Elasticsearch%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fimplementing-ilm-with-write-aliases-logstash-elasticsearch%2F&amp;linkname=Implementing%20ILM%20with%20Write%20Aliases%20%28Logstash%20%2B%20Elasticsearch%29" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fimplementing-ilm-with-write-aliases-logstash-elasticsearch%2F&#038;title=Implementing%20ILM%20with%20Write%20Aliases%20%28Logstash%20%2B%20Elasticsearch%29" data-a2a-url="https://linuxcent.com/implementing-ilm-with-write-aliases-logstash-elasticsearch/" data-a2a-title="Implementing ILM with Write Aliases (Logstash + Elasticsearch)"></a></p><p>The post <a href="https://linuxcent.com/implementing-ilm-with-write-aliases-logstash-elasticsearch/">Implementing ILM with Write Aliases (Logstash + Elasticsearch)</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/implementing-ilm-with-write-aliases-logstash-elasticsearch/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1379</post-id>	</item>
		<item>
		<title>Housekeeping on gitlab and practical examples using gitlab-ctl</title>
		<link>https://linuxcent.com/housekeeping-on-gitlab-and-practical-examples/</link>
					<comments>https://linuxcent.com/housekeeping-on-gitlab-and-practical-examples/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 08 Mar 2023 04:13:58 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=347</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span>In this section we will see some important housekeeping tasks while maintaining gitlab server. We will list out some of the important configuration services present in gitlab and best housekeeping tips. The important configuration file for gitlab is: Once the changes are made to this file it should be followed up running the reconfigure to ... <a title="Housekeeping on gitlab and practical examples using gitlab-ctl" class="read-more" href="https://linuxcent.com/housekeeping-on-gitlab-and-practical-examples/" aria-label="Read more about Housekeeping on gitlab and practical examples using gitlab-ctl">Read more</a></p>
<p>The post <a href="https://linuxcent.com/housekeeping-on-gitlab-and-practical-examples/">Housekeeping on gitlab and practical examples using gitlab-ctl</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span><p>In this section we will see some important housekeeping tasks while maintaining gitlab server.</p>
<p>We will list out some of the important configuration services present in gitlab and best housekeeping tips.<br />
The important configuration file for gitlab is: <code>/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml</code><br />
Once the changes are made to this file it should be followed up running the reconfigure to apply the changes.<br />
The chef server reads the config files and then updates the system wide configuration resources.</p>
<h2>Reconfiguring the gitlab</h2>
<pre>[vamshi@gitlab ~]$ sudo gitlab-ctl reconfigure</pre>
<p>This command reloads the configuration from the configuration files and also migrated if any changes regiuired to the Postgresql database.</p>
<p>View all the current logs run the <code>gitlab-ctl tail</code> command.</p>
<pre>[vamshi@node01 ~]$ sudo gitlab-ctl tail
==&gt; /var/log/gitlab/gitlab-shell/gitlab-shell.log &lt;==

==&gt; /var/log/gitlab/gitlab-rails/sidekiq.log &lt;==
2020-04-o2_13:30:24.29475 2020-04-02T13:30:24.293Z 8872 TID-or0k2ve5w PagesDomainVerificationCronWorker JID-e46ed1d452563ca9b7d4adca INFO: done: 0.357 sec
-- OUTPUT TRUNCATED --
</pre>
<p>This in one of the first command you need when troubleshooting your gitlab server..<br />
This prints the logs from various components present in gitlab and you as an administrator will be able to effectively identify the issues.<br />
To start the interactive ruby console and debug mostly used for Database interaction operations, it takes -e as argument and takes you to the production environment. -s takes you to the sandbox environment.</p>
<pre>gitlab-rails console &lt;-e|-s&gt; [environment]</pre>
<p>For example we can get the complete gitlab information using the following gitlab:env:info:</p>
<pre>[vamshi@gitlab ~]$ sudo gitlab-rails gitlab:env:info
[sudo] password for vamshi:

System information
System: 
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.5.3p105
Gem Version: 2.7.6
Bundler Version:1.17.3
Rake Version: 12.3.2
Redis Version: 3.2.12
Git Version: 2.18.1
GitLab information
Version: 11.10.4-ee
Revision: 88a3c791734

GitLab Shell
Version: 9.0.0

-- OUTPUT TRUNCATED --
</pre>
<p>Some more important commands for gitlab Houseeping:</p>
<pre>[vamshi@gitlab ~]$ sudo gitlab-rails gitlab:check
[sudo] password for vamshi:
Checking GitLab subtasks ...

Checking GitLab Shell ...

-- OUTPUT TRUNCATED --
</pre>
<p>How to restart the gitlab serer from command line ?</p>
<pre>[vamshi@gitlab ~]$ sudo gitlab-rails restart</pre>
<p>How to clear the gitlab logs by truncating them to Zero bytes?</p>
<pre>[vamshi@gitlab ~]$ sudo gitlab-rails log:clear</pre>
<p>How To print the high level stats of gitlab server?</p>
<pre>[vamshi@gitlab ~]$ sudo gitlab-rails stats</pre>
<h2>What is GitLab housekeeping?</h2>
<p>GitLab supports and automates housekeeping tasks within your current repository such as: Compressing Git objects. Removing unreachable objects.</p>
<h2>What is GitLab housekeeping?</h2>
<p>How do I clean up GitLab repository?</p>
<ul>
<li>To clean up a repository:</li>
<li>Go to the project for the repository.</li>
<li>Navigate to Settings &gt; Repository.</li>
<li>Upload a list of objects. For example, a commit-map file created by git filter-repo which is located in the filter-</li>
<li>repo directory. &#8230;</li>
<li>Click Start cleanup.</li>
</ul>
<h2>What is Git repack?</h2>
<p>DESCRIPTION. This command is used to combine all objects that do not currently reside in a &#8220;pack&#8221;, into a pack. It can also be used to re-organize existing packs into a single, more efficient pack.</p>
<h2>What does Git prune do?</h2>
<p>The git prune command is an internal housekeeping utility that cleans up unreachable or &#8220;orphaned&#8221; Git objects. Unreachable objects are those that are inaccessible by any refs. Any commit that cannot be accessed through a branch or tag is considered unreachable.</p>
<h2>How do I know if GitLab is running?</h2>
<p>When a user goes to your GitLab URL, they will be shown an arbitrary Deploy in progress page. To remove the page, you simply run sudo gitlab-ctl deploy-page down . You can also check the status of the deploy page with sudo gitlab-ctl deploy-page status.</p>
<h2>How do I maintain a Git repository?</h2>
<p>Manually reviewing large files in your repository</p>
<ul>
<li>Download the script to your local system.</li>
<li>Put it in a well known location accessible to your Git repository.</li>
<li>Make the script an executable: &#8230;</li>
<li>Clone the repository to your local system.</li>
<li>Change directory to your repository root.</li>
<li>Run the Git garbage collector manually.</li>
</ul>
<h2>How do I purge Gitlab?</h2>
<p>uninstall Gitlab:</p>
<ol>
<li>Stop the gitlab service. Command : sudo gitlab-ctl stop.</li>
<li>Start commonde of service facility. command : sudo gitlab-ctl uninstall.</li>
<li>Delete the package of gitlab. command : Locat gitlab.</li>
<li>restart machine.</li>
</ol>
<h2>How do I empty a Gitlab project?</h2>
<p>Delete a project</p>
<ol>
<li>On the top bar, select Menu &gt; Projects and find your project.</li>
<li>On the left sidebar, select Settings &gt; General.</li>
<li>Expand Advanced.</li>
<li>In the “Delete project” section, select Delete project.</li>
<li>Confirm the action when asked to.</li>
</ol>
<h2>Are git repos compressed?</h2>
<p>Thirdly, Git stores its data as compressed objects, whereas SVN stores them as uncompressed copies. Go into any . svn/text-base directory, and you&#8217;ll find uncompressed copies of the (base) files.</p>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fhousekeeping-on-gitlab-and-practical-examples%2F&amp;linkname=Housekeeping%20on%20gitlab%20and%20practical%20examples%20using%20gitlab-ctl" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fhousekeeping-on-gitlab-and-practical-examples%2F&amp;linkname=Housekeeping%20on%20gitlab%20and%20practical%20examples%20using%20gitlab-ctl" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fhousekeeping-on-gitlab-and-practical-examples%2F&amp;linkname=Housekeeping%20on%20gitlab%20and%20practical%20examples%20using%20gitlab-ctl" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fhousekeeping-on-gitlab-and-practical-examples%2F&amp;linkname=Housekeeping%20on%20gitlab%20and%20practical%20examples%20using%20gitlab-ctl" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fhousekeeping-on-gitlab-and-practical-examples%2F&amp;linkname=Housekeeping%20on%20gitlab%20and%20practical%20examples%20using%20gitlab-ctl" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fhousekeeping-on-gitlab-and-practical-examples%2F&amp;linkname=Housekeeping%20on%20gitlab%20and%20practical%20examples%20using%20gitlab-ctl" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fhousekeeping-on-gitlab-and-practical-examples%2F&amp;linkname=Housekeeping%20on%20gitlab%20and%20practical%20examples%20using%20gitlab-ctl" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fhousekeeping-on-gitlab-and-practical-examples%2F&#038;title=Housekeeping%20on%20gitlab%20and%20practical%20examples%20using%20gitlab-ctl" data-a2a-url="https://linuxcent.com/housekeeping-on-gitlab-and-practical-examples/" data-a2a-title="Housekeeping on gitlab and practical examples using gitlab-ctl"></a></p><p>The post <a href="https://linuxcent.com/housekeeping-on-gitlab-and-practical-examples/">Housekeeping on gitlab and practical examples using gitlab-ctl</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/housekeeping-on-gitlab-and-practical-examples/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">347</post-id>	</item>
		<item>
		<title>kubernetes bash completion</title>
		<link>https://linuxcent.com/kubernetes-bash-completion/</link>
					<comments>https://linuxcent.com/kubernetes-bash-completion/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 08 Mar 2023 04:10:06 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=604</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span>Wouldn&#8217;t it be great when we are using kubernetes and just tab to get a list of possible subcommands? We have the extended facility to automatically tab and get the kubectl command suggestions, This feature is inbuilt into the and , All we need to just extract the script and enable it to the and ... <a title="kubernetes bash completion" class="read-more" href="https://linuxcent.com/kubernetes-bash-completion/" aria-label="Read more about kubernetes bash completion">Read more</a></p>
<p>The post <a href="https://linuxcent.com/kubernetes-bash-completion/">kubernetes bash completion</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span><p>Wouldn&#8217;t it be great when we are using kubernetes and just tab to get a list of possible subcommands?</p>
<p>We have the extended facility to automatically tab and get the kubectl command suggestions, This feature is inbuilt into the <code>kubectl</code> and <code>kubeadmin</code>, All we need to just extract the script and enable it to the <code>.bash_profile</code> and source it. Lets do it as show below</p>
<pre>[vamshi@workstation ~]$ kubectl completion bash &gt; ~/.kube/k8s_bash_completion.sh</pre>
<pre>[vamshi@workstation ~]$ echo -e "\n#kubectl shell completion\nsource '$HOME/.kube/k8s_bash_completion.sh'\n" &gt;&gt; $HOME/.bash_profile</pre>
<pre>[vamshi@workstation ~]$ source $HOME/.bash_profile</pre>
<p>Once you have successfully sourced the .bash_profie file.. type kubectl commands and keep tabbing all the way to get the suitable suggestions.</p>
<h2>What is kubectl bash completion?</h2>
<p>The kubectl completion script for Bash can be generated with the command kubectl completion bash . &#8230; However, the completion script depends on bash-completion, which means that you have to install this software first (you can test if you have bash-completion already installed by running type _init_completion ).</p>
<h2>How do I create a completion in bash?</h2>
<p>How to add bash auto completion in Ubuntu Linux</p>
<ol>
<li>Open the terminal application.</li>
<li>Refresh package database on Ubuntu by running: sudo apt update.</li>
<li>Install bash-completion package on Ubuntu by running: sudo apt install bash-completion.</li>
<li>Log out and log in to verify that bash auto completion in Ubuntu Linux working properly.</li>
</ol>
<h2>What is kubectl auto completion?</h2>
<p>Shell command-line completion allows you to quickly build your command without having to type every character. &#8230; The Kubernetes documentation provides great instructions on how to set it up for your development environment.</p>
<h2>How do you use kubectl autocomplete?</h2>
<p>To use shell autocompletion with kubectl simply press tab while writing out a command. For example we can type g and then press tab to autocomplete to get .</p>
<h2>What is difference between Docker and Kubernetes?</h2>
<p>A fundamental difference between Kubernetes and Docker is that Kubernetes is meant to run across a cluster while Docker runs on a single node. &#8230; Kubernetes pods—scheduling units that can contain one or more containers in the Kubernetes ecosystem—are distributed among nodes to provide high availability.</p>
<h2>Is zsh better than bash?</h2>
<p>It has many features like Bash but some features of Zsh make it better and improved than Bash, such as spelling correction, cd automation, better theme, and plugin support, etc. Linux users don&#8217;t need to install the Bash shell because it is installed by default with Linux distribution.</p>
<h2>How does bash completion work?</h2>
<p>The programmable completion feature in Bash permits typing a partial command, then pressing the [Tab] key to auto-complete the command sequence. [1] If multiple completions are possible, then [Tab] lists them all. Let&#8217;s see how it works. Tab completion also works for variables and path names.</p>
<h2>How do I know if bash completion is installed?</h2>
<p>If the autocomplete results contain directories only (no files), then Bash Completion is installed. If the autocomplete results include files, then Bash Completion is not installed.</p>
<h2>What is complete command?</h2>
<p>complete is a bash command used to perform the auto-complete action when the user hit the TAB key in a terminal. Calling just complete will list all the functions registered for auto-completion of commands or services options.</p>
<h2>What is the difference between Minikube and Kubernetes?</h2>
<p>Kubernetes is an open source orchestration system for Docker containers. &#8230; On the other hand, minikube is detailed as &#8220;Local Kubernetes engine&#8221;. It implements a local Kubernetes cluster on macOS, Linux, and Windows.</p>
<h2>How do I know if kubectl is installed?</h2>
<p>Install the kubectl Command Line</p>
<ol>
<li>Check that kubectl is correctly installed and configured by running the kubectl cluster-info command: kubectl cluster-info. &#8230;</li>
<li>You can also verify the cluster by checking the nodes. &#8230;</li>
<li>To get complete information on each node, run the following: kubectl describe node.</li>
</ol>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fkubernetes-bash-completion%2F&amp;linkname=kubernetes%20bash%20completion" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fkubernetes-bash-completion%2F&amp;linkname=kubernetes%20bash%20completion" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fkubernetes-bash-completion%2F&amp;linkname=kubernetes%20bash%20completion" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fkubernetes-bash-completion%2F&amp;linkname=kubernetes%20bash%20completion" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fkubernetes-bash-completion%2F&amp;linkname=kubernetes%20bash%20completion" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fkubernetes-bash-completion%2F&amp;linkname=kubernetes%20bash%20completion" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fkubernetes-bash-completion%2F&amp;linkname=kubernetes%20bash%20completion" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fkubernetes-bash-completion%2F&#038;title=kubernetes%20bash%20completion" data-a2a-url="https://linuxcent.com/kubernetes-bash-completion/" data-a2a-title="kubernetes bash completion"></a></p><p>The post <a href="https://linuxcent.com/kubernetes-bash-completion/">kubernetes bash completion</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/kubernetes-bash-completion/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">604</post-id>	</item>
		<item>
		<title>Docker Networking basics and the types of networks</title>
		<link>https://linuxcent.com/docker-networking-basics-and-the-types-of-networks/</link>
					<comments>https://linuxcent.com/docker-networking-basics-and-the-types-of-networks/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 08 Mar 2023 04:03:27 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=870</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 5</span> <span class="rt-label rt-postfix">minutes</span></span>The docker networking comprises of a overlay network and enabled communication with the outside resources using it. There are following main types of built in connectivity networking drivers namely the , , , and the with no network. The docker container networking Model CNM architecture manages the networking for Docker container. IPAM which stands for ... <a title="Docker Networking basics and the types of networks" class="read-more" href="https://linuxcent.com/docker-networking-basics-and-the-types-of-networks/" aria-label="Read more about Docker Networking basics and the types of networks">Read more</a></p>
<p>The post <a href="https://linuxcent.com/docker-networking-basics-and-the-types-of-networks/">Docker Networking basics and the types of networks</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 5</span> <span class="rt-label rt-postfix">minutes</span></span><p>The docker networking comprises of a overlay network and enabled communication with the outside resources using it.</p>
<p>There are following main types of built in connectivity networking drivers namely the <code>bridged</code>, <code>host</code>, <code>macvlan</code>, <code>overlay network</code> and the <code>null driver</code> with no network.</p>
<p>The docker container networking Model CNM architecture manages the networking for Docker container.</p>
<p>IPAM which stands for the IP address management works in a single docker node, and aids in Enabling the network connectivity among the doccker containers. Its primary responsibility is to allocate the IP address space for the subnets, allocation of the IP addresses to the endpoints and the network etc,.</p>
<p>The networking in docker is essentially an isolated sandbox environment, The isolation of the networking resources is possible by the namespaces</p>
<p>The overlay network enables the communication enabled the network spanning across many docker nodes on an environment like the Docker swarm network, The same networking logic is evident in a bridge networking but it is ony limited to a single docker host unlike the overlay network.</p>
<p>Here&#8217;s the output snippet from the docker info command; Listing the available network drivers.</p>
<pre># docker info
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay</pre>
<p>The container networking enables connectivity inbetween the docker containers and also the host machine to docker container and vice-versa.</p>
<p>Listing the default networks in docker:</p>
<pre>[vamshi@node01 nginx]$ docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
68b2ffd36e8f        bridge              bridge              local
c1aca4c87a2b        host                host                local
d5e48683def8        none                null                local</pre>
<p>When a container is created by default it connects to the bridge network unless an extra arguments are specified.</p>
<p>When you install the docker by default a docker0 virtual interface is created which behaves as a bridge between the docker containers and the host system.</p>
<pre>[vamshi@node01 nginx]$ brctl show
bridge name	bridge id		STP enabled	interfaces
docker0		8000.0242654b42ef	no</pre>
<p>For brctl command we need to Install the <code>bridge-util</code> package.</p>
<p>We now examine the docker networks with docker network inspect.</p>
<h2>Inspecting the various docker networks:</h2>
<p>Inspecting the bridge network:</p>
<p>The bridge networking enables the network connectivity over the dockers in a single docker server host.</p>
<pre>[vamshi@node01 nginx]$ docker network inspect bridge
[
    {
        "Name": "bridge",
        "Id": "68b2ffd36e8fcdc0c3b170dfdbdbc93bb58351d1b2c011abc80709928463f809",
        "Created": "2020-05-23T10:28:27.206979057Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.17.0.0/16",
                    "Gateway": "172.17.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Containers": {},
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"
        },
        "Labels": {}
    }
]</pre>
<p>This bridge is shown with the ip addr command as follows:</p>
<pre># ip addr show docker0 
   docker0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:65:4b:42:ef brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:65ff:fe4b:42ef/64 scope link 
       valid_lft forever preferred_lft forever</pre>
<p>Inspecting the host network.</p>
<pre>[vamshi@node01 ~]$ docker network inspect host 
[
    {
        "Name": "host",
        "Id": "c1aca4c87a2b3e7db4661e0cdedc97245cd5dfdc8aa2c9e6fa4ff1d5ecf9f3c1",
        "Created": "2019-05-16T18:46:19.485377974Z",
        "Scope": "local",
        "Driver": "host",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": []
        },
        "Internal": false,
        "Attachable": false,
        "Containers": {},
        "Options": {},
        "Labels": {}
    }
]</pre>
<p>Inspecting the null driver network</p>
<pre>[vamshi@node01 ~]$ docker network inspect none
[
    {
        "Name": "none",
        "Id": "d5e48683def80b2e739b3be95e58fb11abc580ce29a33ba0df679a7a3972f532",
        "Created": "2019-05-16T18:46:19.477155061Z",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": []
        },
        "Internal": false,
        "Attachable": false,
        "Containers": {},
        "Options": {},
        "Labels": {}
    }
]</pre>
<p>&nbsp;</p>
<p>The following are special networking architectures to span across multihost docker servers enabling network connectivity among the docker containers.</p>
<p>1.Overlay network</p>
<p>2 macvlan network.</p>
<p>Let us inspect the multi host networking:</p>
<p>The core components of the docker interhost network consists of</p>
<p>Inspecting the overlay network:</p>
<pre>[vamshi@docker-master ~]$ docker network inspect overlay-linuxcent 
[
    {
        "Name": "overlay-linuxcent",
        "Id": "qz5ucx9hthyva53cydei0y8yv",
        "Created": "2020-05-25T13:22:35.087032198Z",
        "Scope": "swarm",
        "Driver": "overlay",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "10.255.0.0/16",
                    "Gateway": "10.255.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Containers": {
            "ingress-sbox": {
                "Name": "overlay-linuxcent-endpoint",
                "EndpointID": "165beb97b22c2857e3637119016ef88e462a05d3b3251c4f66aa0fc9176cfe67",
                "MacAddress": "02:42:0a:ff:00:03",
                "IPv4Address": "10.255.0.3/16",
                "IPv6Address": ""
            }
        },
        "Options": {
            "com.docker.network.driver.overlay.vxlanid_list": "4096"
        },
        "Labels": {},
        "Peers": [
            {
                "Name": "node01.linuxcent.com-95ad856b6f56",
                "IP": "10.100.0.20"
            }
        ]
    }
]</pre>
<p>The endpoint is the Virtual IP addressing that routes the traffic to the respective containers running on individual docker nodes.</p>
<p>Inspecting the macvlan network:</p>
<pre>vamshi@docker-master ~]$ docker network inspect macvlan-linuxcent 
[
    {
        "Name": "macvlan-linuxcent",
        "Id": "99c6a20bd4029ce5a37139c6e6792ec4f8a075c94b5f3e71efc32d92d41f3f89",
        "Created": "2020-05-25T14:20:00.655299409Z",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.20.0.0/16",
                    "Gateway": "172.20.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Containers": {},
        "Options": {},
        "Labels": {}
    }
]
</pre>
<h2>What is Docker networking?</h2>
<p>Docker networking is primarily used to establish communication between Docker containers and the outside world via the host machine where the Docker daemon is running. &#8230; You can run hundreds of containers on a single-node Docker host, so it&#8217;s required that the host can support networking at this scale.</p>
<h2>How does networking work with Docker?</h2>
<p>Docker secures the network by managing rules that block connectivity between different Docker networks. Behind the scenes, the Docker Engine creates the necessary Linux bridges, internal interfaces, iptables rules, and host routes to make this connectivity possible.</p>
<h2>How do I connect to a Docker network?</h2>
<p>Connect a container to a network when it starts</p>
<p>You can also use the docker run &#8211;network= option to start a container and immediately connect it to a network.</p>
<h2>Can a Docker container have multiple networks?</h2>
<p>You can create multiple networks with Docker and add containers to one or more networks. Containers can communicate within networks but not across networks. A container with attachments to multiple networks can connect with all of the containers on all of those networks.</p>
<h2>Why is docker network needed?</h2>
<p>Some of the major benefits of using Docker Networking are: They share a single operating system and maintain containers in an isolated environment. It requires fewer OS instances to run the workload. It helps in the fast delivery of software.</p>
<h2>What are the types of docker networks?</h2>
<p>There are three common Docker network types – bridge networks, used within a single host, overlay networks, for multi-host communication, and macvlan networks which are used to connect Docker containers directly to host network interfaces.</p>
<h2>How do I ping a Docker container?</h2>
<p>Ping the IP address of the container from the shell prompt of your Docker host by running ping -c5 . Remember to use the IP of the container in your environment. The replies above show that the Docker host can ping the container over the bridge network.</p>
<h2>What does Docker network create do?</h2>
<p>When you install Docker Engine it creates a bridge network automatically. This network corresponds to the docker0 bridge that Engine has traditionally relied on. When you launch a new container with docker run it automatically connects to this bridge network.</p>
<h2>Does Docker offer support for IPv6?</h2>
<p>Before you can use IPv6 in Docker containers or swarm services, you need to enable IPv6 support in the Docker daemon. Afterward, you can choose to use either IPv4 or IPv6 (or both) with any container, service, or network. Note: IPv6 networking is only supported on Docker daemons running on Linux hosts.</p>
<h2>How do I run a docker on a local network?</h2>
<p>This article discusses four ways to make a Docker container appear on a local network.<br />
&#8230;</p>
<ul>
<li>Using NAT</li>
<li>It will create a veth interface pair.</li>
<li>Connect one end to the docker0 bridge.</li>
<li>Place the other inside the container namespace as eth0 .</li>
<li>Assign an ip address from the network used by the docker0 bridge.</li>
</ul>
<h2>Can a docker container have its own ip address?</h2>
<p>The answer is: you can configure it. Create the container with &#8211;network host and it will use the host ip.</p>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-networking-basics-and-the-types-of-networks%2F&amp;linkname=Docker%20Networking%20basics%20and%20the%20types%20of%20networks" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-networking-basics-and-the-types-of-networks%2F&amp;linkname=Docker%20Networking%20basics%20and%20the%20types%20of%20networks" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-networking-basics-and-the-types-of-networks%2F&amp;linkname=Docker%20Networking%20basics%20and%20the%20types%20of%20networks" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-networking-basics-and-the-types-of-networks%2F&amp;linkname=Docker%20Networking%20basics%20and%20the%20types%20of%20networks" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-networking-basics-and-the-types-of-networks%2F&amp;linkname=Docker%20Networking%20basics%20and%20the%20types%20of%20networks" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-networking-basics-and-the-types-of-networks%2F&amp;linkname=Docker%20Networking%20basics%20and%20the%20types%20of%20networks" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-networking-basics-and-the-types-of-networks%2F&amp;linkname=Docker%20Networking%20basics%20and%20the%20types%20of%20networks" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fdocker-networking-basics-and-the-types-of-networks%2F&#038;title=Docker%20Networking%20basics%20and%20the%20types%20of%20networks" data-a2a-url="https://linuxcent.com/docker-networking-basics-and-the-types-of-networks/" data-a2a-title="Docker Networking basics and the types of networks"></a></p><p>The post <a href="https://linuxcent.com/docker-networking-basics-and-the-types-of-networks/">Docker Networking basics and the types of networks</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/docker-networking-basics-and-the-types-of-networks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">870</post-id>	</item>
		<item>
		<title>docker CMD vs ENTRYPOINT</title>
		<link>https://linuxcent.com/docker-cmd-vs-entrypoint/</link>
					<comments>https://linuxcent.com/docker-cmd-vs-entrypoint/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 08 Mar 2023 04:00:38 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=464</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span>The ENTRYPOINT or CMD usually determine the single and main startup process inside the running container, The ENTRYPOINT and the CMD are the final Docker DSL invocation statements in a Dockerfile.A Dockerfile can not be complete without either one of them. Both the ENTRYPOINT and CMD will execute a , but have significant differences. ENTRYPOINT ... <a title="docker CMD vs ENTRYPOINT" class="read-more" href="https://linuxcent.com/docker-cmd-vs-entrypoint/" aria-label="Read more about docker CMD vs ENTRYPOINT">Read more</a></p>
<p>The post <a href="https://linuxcent.com/docker-cmd-vs-entrypoint/">docker CMD vs ENTRYPOINT</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span><p>The ENTRYPOINT or CMD usually determine the single and main startup process inside the running container, The ENTRYPOINT and the CMD are the final Docker DSL invocation statements in a Dockerfile.A Dockerfile can not be complete without either one of them.</p>
<p>Both the ENTRYPOINT and CMD will execute a <code>/bin/sh -c</code> , but have significant differences.</p>
<p>ENTRYPOINT usually is straight forward with the and is often the statement that enables the  docker image as a runnable container. The ENTRYPOINT statement doesnot let the run time arguments get overwritten during the container runtime, instead the commands are passed on as arguments to the ENTRYPOINT, for Example when the container is started as <code>docker run my-image -d</code>, then the resultant -d argument is passed on as an argument to the ENTRYPOINT.<br />
It means that only last ENTRYPOINT statement is valid in the Dockerfile</p>
<p>The ENTRYPOINT takes CMD as its arguments.</p>
<pre>ENTRYPOINT command arg1 arg2</pre>
<p>OR</p>
<pre>ENTRYPOINT command
CMD ["arg1", "arg2"]</pre>
<pre>ENTRYPOINT ["java","-jar","app.jar"]
CMD ["-Dserver.port=8080"]</pre>
<p>CMD on the other hand is subversive to the ENTRYPOINT.<br />
CMD start statement can be overwritten with container arguments during the container runtime. The <code>CMD</code> does not execute anything at the build time.</p>
<pre>CMD ["command","arg1", "arg2"]
CMD ["java","-Djava.security.egd=file:/dev/urandom","-jar","-Dserver.port=8080","app.jar"]</pre>
<p>The major practical use with CMD is that the you will be able to overwrite the docker runtime command line arguments but you cannot override with you have ENTRYPOINT.</p>
<p>The CMD will be very beneficial in cases which require sending arguments to containers in runtime which in development and QA stages and is great for debugging environments.</p>
<p>The [] are not mandatory for ENTRYPOINT and CMD instruction statements inside Dockerfile but can be given for better readability when you have lot of arguments</p>
<h2>What is the difference between CMD and run in Dockerfile?</h2>
<p>RUN is an image build step, the state of the container after a RUN command will be committed to the container image. A Dockerfile can have many RUN steps that layer on top of one another to build the image. CMD is the command the container executes by default when you launch the built image.</p>
<h2>What is the use of CMD in docker?</h2>
<p>The CMD command​ specifies the instruction that is to be executed when a Docker container starts. This CMD command is not really necessary for the container to work, as the echo command can be called in a RUN statement as well. The main purpose of the CMD command is to launch the software required in a container.</p>
<h2>What is docker ENTRYPOINT script?</h2>
<p>entrypoint scripts are plugins that can be written in any language. inherited images can add to existing entrypoint scripts by simply adding to the /docker-entrypoint.</p>
<h2>What is the purpose of ENTRYPOINT in Dockerfile?</h2>
<p>In Dockerfiles, an ENTRYPOINT instruction is used to set executables that will always run when the container is initiated. Unlike CMD commands, ENTRYPOINT commands cannot be ignored or overridden—even when the container runs with command line arguments stated.</p>
<h2>Can Dockerfile have multiple ENTRYPOINT?</h2>
<p>According to the documentation however, there must be only one ENTRYPOINT in a Dockerfile.</p>
<h2>What is Docker ENTRYPOINT Initdb?</h2>
<p>3. 3. /docker-entrypoint-initdb. d/init. sql is executed the moment your database container starts running, while your entrypoint.sh is executed the moment your web container starts running.</p>
<h2>Does docker start run ENTRYPOINT?</h2>
<p>So yes, the &#8216; CMD &#8216; commands are executed after a &#8216; docker start &#8216;.</p>
<h2>Can Dockerfile have multiple CMD?</h2>
<p>You are right, the second Dockerfile will overwrite the CMD command of the first one. Docker will always run a single command, not more. So at the end of your Dockerfile, you can specify one command to run.</p>
<h2>What is in docker Run command?</h2>
<p>The docker run command creates a container from a given image and starts the container using a given command. It is one of the first commands you should become familiar with when starting to work with Docker.</p>
<h2>What is difference between CMD and entrypoint?</h2>
<p>In a nutshell: CMD sets default command and/or parameters, which can be overwritten from command line when docker container runs. ENTRYPOINT command and parameters will not be overwritten from command line. Instead, all command line arguments will be added after ENTRYPOINT parameters.</p>
<h2>What is the default entrypoint for docker?</h2>
<p>/bin/sh -c<br />
Docker defaults the entrypoint to /bin/sh -c . This means you&#8217;ll end up in a shell session when you start the container.</p>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-cmd-vs-entrypoint%2F&amp;linkname=docker%20CMD%20vs%20ENTRYPOINT" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-cmd-vs-entrypoint%2F&amp;linkname=docker%20CMD%20vs%20ENTRYPOINT" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-cmd-vs-entrypoint%2F&amp;linkname=docker%20CMD%20vs%20ENTRYPOINT" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-cmd-vs-entrypoint%2F&amp;linkname=docker%20CMD%20vs%20ENTRYPOINT" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-cmd-vs-entrypoint%2F&amp;linkname=docker%20CMD%20vs%20ENTRYPOINT" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-cmd-vs-entrypoint%2F&amp;linkname=docker%20CMD%20vs%20ENTRYPOINT" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-cmd-vs-entrypoint%2F&amp;linkname=docker%20CMD%20vs%20ENTRYPOINT" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fdocker-cmd-vs-entrypoint%2F&#038;title=docker%20CMD%20vs%20ENTRYPOINT" data-a2a-url="https://linuxcent.com/docker-cmd-vs-entrypoint/" data-a2a-title="docker CMD vs ENTRYPOINT"></a></p><p>The post <a href="https://linuxcent.com/docker-cmd-vs-entrypoint/">docker CMD vs ENTRYPOINT</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/docker-cmd-vs-entrypoint/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">464</post-id>	</item>
		<item>
		<title>Create a new User in Jenkins</title>
		<link>https://linuxcent.com/create-a-new-user-in-jenkins/</link>
					<comments>https://linuxcent.com/create-a-new-user-in-jenkins/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 08 Mar 2023 04:00:06 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=293</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span>Login to the Jenkins and navigate to the Manage Jenkins -&#62; Manage Users. Now you will be able to see the current users on the Jenkins. You should be able to land on the URL similar to this: On the Left hand side menu Click on and follow the process. . With this process you ... <a title="Create a new User in Jenkins" class="read-more" href="https://linuxcent.com/create-a-new-user-in-jenkins/" aria-label="Read more about Create a new User in Jenkins">Read more</a></p>
<p>The post <a href="https://linuxcent.com/create-a-new-user-in-jenkins/">Create a new User in Jenkins</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span><p>Login to the Jenkins and navigate to the Manage Jenkins -&gt; Manage Users. Now you will be able to see the current users on the Jenkins.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-303" src="https://linuxcent.com/wp-content/uploads/2020/04/Create-user-in-jenkins-form.png" alt="Create-new-user-in-jenkins-securityRealm" width="807" height="436" srcset="https://linuxcent.com/wp-content/uploads/2020/04/Create-user-in-jenkins-form.png 807w, https://linuxcent.com/wp-content/uploads/2020/04/Create-user-in-jenkins-form-300x162.png 300w, https://linuxcent.com/wp-content/uploads/2020/04/Create-user-in-jenkins-form-768x415.png 768w" sizes="auto, (max-width: 807px) 100vw, 807px" /><br />
You should be able to land on the URL similar to this: <code>http://jenkins.linuxcent.com:8080/securityRealm/</code></p>
<p>On the Left hand side menu Click on <code>Create User</code> and follow the process. .<br />
<img loading="lazy" decoding="async" class="alignnone size-large wp-image-306" src="https://linuxcent.com/wp-content/uploads/2020/04/Create-user-Jenkins-own-user-database-1024x295.png" alt="Create-user-Jenkins-own-user-database" width="1024" height="295" srcset="https://linuxcent.com/wp-content/uploads/2020/04/Create-user-Jenkins-own-user-database-1024x295.png 1024w, https://linuxcent.com/wp-content/uploads/2020/04/Create-user-Jenkins-own-user-database-300x87.png 300w, https://linuxcent.com/wp-content/uploads/2020/04/Create-user-Jenkins-own-user-database-768x221.png 768w, https://linuxcent.com/wp-content/uploads/2020/04/Create-user-Jenkins-own-user-database.png 1231w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><br />
With this process you will be able to create a new user using the Jenkins&#8217;s own user database.</p>
<p>You can also ensure the Jenkins system user details from the jenkins server by navigating to the path $JENKINS_HOME and from the file <code>users/users.xml</code></p>
<pre>[root@node02 jenkins]# grep -w builduser * users/users.xml 2&gt;/dev/null 
users/users.xml: &lt;string&gt;builduser&lt;/string&gt;
</pre>
<h2>How do I give user access to Jenkins?</h2>
<p>Essentially you do this:</p>
<ul>
<li>Go to Jenkins -&gt; Manage Jenkins -&gt; Configure Global Security.</li>
<li>Check &#8220;Enable security&#8221;.</li>
<li>Set &#8220;Jenkins own user database&#8221; as security realm.</li>
<li>Check &#8220;Allow users to sign up&#8221;</li>
<li>Choose &#8220;Matrix based security&#8221;</li>
<li>Check &#8220;Overall read&#8221; on Anonymous.</li>
<li>Add your admin account in the matrix, check every box.</li>
</ul>
<h2>How do I make the first admin in Jenkins?</h2>
<p>Jenkins &#8211; Security</p>
<ul>
<li>Step 1 − Click on Manage Jenkins and choose the &#8216;Configure Global Security&#8217; option.</li>
<li>Step 2 − Click on Enable Security option. &#8230;</li>
<li>Step 3 − You will be prompted to add your first user. &#8230;</li>
<li>Step 4 − It&#8217;s now time to setup your users in the system.</li>
</ul>
<h2>How get manage users in Jenkins?</h2>
<div class="r21Kzd" data-hveid="CDMQAQ" data-ved="2ahUKEwi4luK83ZL0AhU8H7cAHTwXAaQQuk56BAgzEAE">When you <b>go to manage Jenkins and scroll down</b>, you will see the &#8216;Manage Users&#8217; option. Click on this option. Step 2: Just Like, you defined the admin user, and start creating other users for the system.</div>
<h2>How do I change users in Jenkins?</h2>
<div>To change the jenkins user, open the /etc/sysconfig/jenkins (in debian this file is created in /etc/default) and change the JENKINS_USER to whatever you want. Make sure that user exists in the system (you can check the user in the /etc/passwd file ).</div>
<h2>How do I create multiple users in Jenkins?</h2>
<div>in jenkins go to Manage Jenkins &gt; Configure Global Security and select the &#8220;Enable Security&#8221; check box. select &#8220;Jenkins Own User Database&#8221; for the security realm and then select &#8220;Logged in Users can do anything&#8221; or a matrix based strategy (If you have multiple users with different permissions) for the Authorization.</div>
<h2>What user runs Jenkins?</h2>
<div>
<p>Similar to access control for users, builds in Jenkins run with an associated user authorization. By default, builds run as <b>the internal SYSTEM user</b> that has full permissions to run on any node, create or delete jobs, start and cancel other builds, etc.</p>
<h2>Is it possible to create users and define roles for them in Jenkins?</h2>
<p>By default, Jenkins comes with very basic user creation options. You can create multiple users but can only assign the same global roles and privileges to them. The Role Strategy Plugin enable you to assign different roles and privileges to different users.</p>
<h2>How do I give Jenkins a user root permission?</h2>
<p>Below are the steps to achieve this.</p>
<ul>
<li>#1 open /etc/sudoers. type sudo vi /etc/sudoers . This will open your file in edit mode.</li>
<li>#2 Add/Modify jenkins user. Look for the entry for jenkins user. Modify as below if found or add a new line. &#8230;</li>
<li>#3 Save and Exit from edit mode. Press ESC and type :wq and hit Enter .</li>
</ul>
<h2>Where does Jenkins Store users?</h2>
<p>Jenkins stores the configuration for each job within an eponymous directory in jobs/. The job configuration file is config. xml, the builds are stored in builds/, and the working directory is workspace/.</p>
<h2>How do I create a user and group in Jenkins?</h2>
<p>Follow the steps below:</p>
<ul>
<li>Log in to Jenkins using the existing administrative user account credentials.</li>
<li>Navigate to the “Manage Jenkins -&gt; Manage Users” page.</li>
<li>Select the “Create User” option.</li>
<li>Enter a username, password, name and email address to create a new user. &#8230;</li>
<li>Save the new account.</li>
</ul>
</div>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fcreate-a-new-user-in-jenkins%2F&amp;linkname=Create%20a%20new%20User%20in%20Jenkins" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fcreate-a-new-user-in-jenkins%2F&amp;linkname=Create%20a%20new%20User%20in%20Jenkins" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fcreate-a-new-user-in-jenkins%2F&amp;linkname=Create%20a%20new%20User%20in%20Jenkins" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fcreate-a-new-user-in-jenkins%2F&amp;linkname=Create%20a%20new%20User%20in%20Jenkins" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fcreate-a-new-user-in-jenkins%2F&amp;linkname=Create%20a%20new%20User%20in%20Jenkins" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fcreate-a-new-user-in-jenkins%2F&amp;linkname=Create%20a%20new%20User%20in%20Jenkins" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fcreate-a-new-user-in-jenkins%2F&amp;linkname=Create%20a%20new%20User%20in%20Jenkins" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fcreate-a-new-user-in-jenkins%2F&#038;title=Create%20a%20new%20User%20in%20Jenkins" data-a2a-url="https://linuxcent.com/create-a-new-user-in-jenkins/" data-a2a-title="Create a new User in Jenkins"></a></p><p>The post <a href="https://linuxcent.com/create-a-new-user-in-jenkins/">Create a new User in Jenkins</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/create-a-new-user-in-jenkins/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">293</post-id>	</item>
		<item>
		<title>Initiating a docker swarm and getting the current docker swarm token</title>
		<link>https://linuxcent.com/initiating-a-docker-swarm-and-getting-the-current-docker-swarm-token/</link>
					<comments>https://linuxcent.com/initiating-a-docker-swarm-and-getting-the-current-docker-swarm-token/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 08 Mar 2023 03:50:44 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=891</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span>Creating a docker swarm cluster: The docker swarm can be created by using the following command: The syntax is defined as follows: docker swarm init --advertise-addr [available interface IP adress] The &#8211;advertise-addr is used to explicitly define the docker swarm advertise ip. If you have a single interface this option will not be needed but ... <a title="Initiating a docker swarm and getting the current docker swarm token" class="read-more" href="https://linuxcent.com/initiating-a-docker-swarm-and-getting-the-current-docker-swarm-token/" aria-label="Read more about Initiating a docker swarm and getting the current docker swarm token">Read more</a></p>
<p>The post <a href="https://linuxcent.com/initiating-a-docker-swarm-and-getting-the-current-docker-swarm-token/">Initiating a docker swarm and getting the current docker swarm token</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span><h2>Creating a docker swarm cluster:</h2>
<p>The docker swarm can be created by using the following command:</p>
<p>The syntax is defined as follows:</p>
<pre>docker swarm init --advertise-addr [available interface IP adress]</pre>
<p>The &#8211;advertise-addr is used to explicitly define the docker swarm advertise ip. If you have a single interface this option will not be needed but will be real handy if you have more than 1 active public accessible interfaces.<br />
Let us initialize our docker swarm environment.</p>
<pre>[vamshi@docker-swarm ~]$ docker swarm init --advertise-addr 10.100.0.20
Swarm initialized: current node (nodeidofmastercdq7nmmq3kcmb5l85k2e) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join \
    --token SWMTKN-1-verylongstringofcharactercontainingthedockerswarmjoinstring-70bouyqwhfgdcgtw6o0fw6wup \
    10.100.0.20:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
</pre>
<p>The docker swarm creation can be viewed from the docker info command as follows:</p>
<pre>[vamshi@docker-swarm ~]$ docker info | grep -C 2 Swarm
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: active
 NodeID: nodeidofmastercdq7nmmq3kcmb5l85k2e
 Is Manager: true
</pre>
<p>The docker swarm explicitly uses the overlay and macvlan to enable the interhost network connectivity between the container over a swarm network</p>
<h2>How to get the docker swarm join token:</h2>
<p>This command can come in very handy when you forgot your docker swarm token and you need to join a new docker node to this docker swarm cluster.</p>
<pre>[vamshi@docker-swarm ~]$ docker swarm join-token manager -q
SWMTKN-1-verylongstringofcharactercontainingthedockerswarmjoinstring-70bouyqwhfgdcgtw6o0fw6wup
</pre>
<h2>How can I get token to join docker Swarm?</h2>
<p>Run the command from the output on the worker to join the swarm: $ docker swarm join \ &#8211;token SWMTKN-1-49nj1cmql0jkz5s954yi3oex3nedyz0fb0xx14ie39trti4wxv-8vxv8rssmk743ojnwacrr2e7c \ 192.168. 99.100:2377 This node joined a swarm as a worker.</p>
<h2>What is token in docker swarm join?</h2>
<p>Join tokens are secrets that allow a node to join the swarm. There are two different join tokens available, one for the worker role and one for the manager role. You pass the token using the &#8211;token flag when you run swarm join. Nodes use the join token only when they join the swarm.</p>
<h2>How do I join a docker swarm worker?</h2>
<p>Once you&#8217;ve created a swarm with a manager node, you&#8217;re ready to add worker nodes.</p>
<ol>
<li>Open a terminal and ssh into the machine where you want to run a worker node. &#8230;</li>
<li>Run the command produced by the docker swarm init output from the Create a swarm tutorial step to create a worker node joined to the existing swarm:</li>
</ol>
<h2>What is the docker command to set up a swarm?</h2>
<p>When you run the command to create a swarm, the Docker Engine starts running in swarm mode. Run docker swarm init to create a single-node swarm on the current node. The Engine sets up the swarm as follows: switches the current node into swarm mode.</p>
<div class="wWOJcd" tabindex="0" role="button" aria-controls="exacc_c_iMYb_RMdqmoATCkKvwDg7" aria-expanded="true" aria-labelledby="exacc_c_iMYb_RMdqmoATCkKvwDg6">
<h2 id="exacc_c_iMYb_RMdqmoATCkKvwDg6" class="iDjcJe IX9Lgd wwB5gf">What is swarm built on?</h2>
<div class="r21Kzd" data-hveid="CAYQAQ" data-ved="2ahUKEwj_1tTQlJD0AhVaE4gKHULICu4Quk56BAgGEAE">Docker Swarm mode is built into <b>the Docker Engine</b>.</div>
<div data-hveid="CAYQAQ" data-ved="2ahUKEwj_1tTQlJD0AhVaE4gKHULICu4Quk56BAgGEAE">
<h2>What is swarm built on CoinList?</h2>
<p>Introducing Wrapped Filecoin (EFIL) Minting on CoinList</p>
<p>By design, Swarm is an economically self-sustaining system of peer-to-peer dragon coin nodes that create a decentralized storage and communication service.</p>
<h2>What is swarm mode?</h2>
<p>Swarm mode is a Docker feature that provides built in container orchestration capabilities, including native clustering of Docker hosts and scheduling of container workloads.</p>
<h2>What is Swarm service?</h2>
<p>A service is the definition of the tasks to execute on the manager or worker nodes. It is the central structure of the swarm system and the primary root of user interaction with the swarm. When you create a service, you specify which container image to use and which commands to execute inside running containers.</p>
<h2>What is the difference between Docker swarm and Kubernetes?</h2>
<p>Kubernetes focuses on open-source and modular orchestration, offering an efficient container orchestration solution for high-demand applications with complex configuration. Docker Swarm emphasizes ease of use, making it most suitable for simple applications that are quick to deploy and easy to manage.</p>
<div class="wWOJcd" tabindex="0" role="button" aria-controls="exacc_g_iMYe-OJpLr-QaFpLnwDg9" aria-expanded="true" aria-labelledby="exacc_g_iMYe-OJpLr-QaFpLnwDg8">
<h2 id="exacc_g_iMYe-OJpLr-QaFpLnwDg8" class="iDjcJe IX9Lgd wwB5gf">What is Docker swarm command?</h2>
<div class="r21Kzd" data-hveid="CAcQAQ" data-ved="2ahUKEwiv3JnYlJD0AhWSdd4KHQVSDu4Quk56BAgHEAE">Run the following command to create a new swarm: <b>$ docker swarm init &#8211;advertise-addr &lt;MANAGER-IP&gt;</b> Note: If you are using Docker Desktop for Mac or Docker Desktop for Windows to test single-node swarm, simply run docker swarm init with no arguments. There is no need to specify &#8211;advertise-addr in this case.</div>
</div>
</div>
<div data-hveid="CAYQAQ" data-ved="2ahUKEwj_1tTQlJD0AhVaE4gKHULICu4Quk56BAgGEAE"></div>
</div>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Finitiating-a-docker-swarm-and-getting-the-current-docker-swarm-token%2F&amp;linkname=Initiating%20a%20docker%20swarm%20and%20getting%20the%20current%20docker%20swarm%20token" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Finitiating-a-docker-swarm-and-getting-the-current-docker-swarm-token%2F&amp;linkname=Initiating%20a%20docker%20swarm%20and%20getting%20the%20current%20docker%20swarm%20token" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Finitiating-a-docker-swarm-and-getting-the-current-docker-swarm-token%2F&amp;linkname=Initiating%20a%20docker%20swarm%20and%20getting%20the%20current%20docker%20swarm%20token" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Finitiating-a-docker-swarm-and-getting-the-current-docker-swarm-token%2F&amp;linkname=Initiating%20a%20docker%20swarm%20and%20getting%20the%20current%20docker%20swarm%20token" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Finitiating-a-docker-swarm-and-getting-the-current-docker-swarm-token%2F&amp;linkname=Initiating%20a%20docker%20swarm%20and%20getting%20the%20current%20docker%20swarm%20token" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Finitiating-a-docker-swarm-and-getting-the-current-docker-swarm-token%2F&amp;linkname=Initiating%20a%20docker%20swarm%20and%20getting%20the%20current%20docker%20swarm%20token" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Finitiating-a-docker-swarm-and-getting-the-current-docker-swarm-token%2F&amp;linkname=Initiating%20a%20docker%20swarm%20and%20getting%20the%20current%20docker%20swarm%20token" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Finitiating-a-docker-swarm-and-getting-the-current-docker-swarm-token%2F&#038;title=Initiating%20a%20docker%20swarm%20and%20getting%20the%20current%20docker%20swarm%20token" data-a2a-url="https://linuxcent.com/initiating-a-docker-swarm-and-getting-the-current-docker-swarm-token/" data-a2a-title="Initiating a docker swarm and getting the current docker swarm token"></a></p><p>The post <a href="https://linuxcent.com/initiating-a-docker-swarm-and-getting-the-current-docker-swarm-token/">Initiating a docker swarm and getting the current docker swarm token</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/initiating-a-docker-swarm-and-getting-the-current-docker-swarm-token/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">891</post-id>	</item>
		<item>
		<title>How to push a docker image to a private repository</title>
		<link>https://linuxcent.com/docker-push-to-private-repository/</link>
					<comments>https://linuxcent.com/docker-push-to-private-repository/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 08 Mar 2023 03:46:28 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=524</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span>How to push a docker image to a private repository: In this tutorial we will cover the the stages dealing with tagging the image and pushing a docker image to the private repository. For Docker login please refer Docker login to private registry Now we need to see the two types of docker registry references ... <a title="How to push a docker image to a private repository" class="read-more" href="https://linuxcent.com/docker-push-to-private-repository/" aria-label="Read more about How to push a docker image to a private repository">Read more</a></p>
<p>The post <a href="https://linuxcent.com/docker-push-to-private-repository/">How to push a docker image to a private repository</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 3</span> <span class="rt-label rt-postfix">minutes</span></span><p><strong>How to push a docker image to a private repository:</strong> In this tutorial we will cover the the stages dealing with tagging the image and pushing a docker image to the private repository.</p>
<p>For Docker login please refer <a href="https://linuxcent.com/docker-login-to-private-registry/">Docker login to private registry</a></p>
<p>Now we need to see the two types of docker registry references when pushing the docker images, lets look at the standard docker registry references.<b><br />
</b></p>
<h2>docker image registry reference types</h2>
<p>Public registry format:</p>
<p>The public registry is a free to signup and start using immediately. Here is the docker tagging format.</p>
<pre>[docker-hub-username]/[image-name]:[tag]</pre>
<p>Private registry format:<br />
The private registry is setup on-premises using a hosted docker registry software like docker-registry, nexus-docker registry are among are some of the popular tools to be named. The software is available over the connected network with the given server-name and the desired port to connect to the docker registry service. The format of it is as below</p>
<pre>docker-registry-host:docker-registry-port/[user-name/]image-name[:tag]</pre>
<p>&nbsp;</p>
<h2>STEP 1: Tagging a docker image</h2>
<p>Tagging is a crucial part, As the docker image will be pre-fixed with the registry name which forms the complete unique docker image identity. <code> [DOCKER-REGISTRY-NAME]/[DOCKER-IMAGE]:[TAG]</code></p>
<p>Eg of Public registry format:</p>
<pre># docker-repo/nginx:latest.</pre>
<p>So that it registry name is be pushed to the prefixed Repository name, and Hence the docker image needs to be properly tagged.</p>
<p>The information about your current docker login repository can be found with docker info command.</p>
<p>The docker image has to be properly tagged with <code>docker tag</code> command and prefixed with the Docker-repository name as follows:</p>
<pre>[root@docker03:~]#  sudo docker tag nginx:v1 nexusreg.linuxcent.com:5000/nginx:v1</pre>
<p>the Image gets tagged with the relevant registry name with docker tag command:</p>
<pre>[root@docker03:~]#  docker images
REPOSITORY                                       TAG                 IMAGE ID            CREATED             SIZE
docker.io/nginx                                  latest              602e111c06b6        2 weeks ago         127 MB
nexusreg.linuxcent.com:5000/nginx                v1                  0bc8c50014c7        20 minutes ago      193 MB
jfrog.linuxcent.com/debian-vamshi                v1                  0568d1ef9d81        1 day ago           253 MB
</pre>
<h2>STEP 2: Push the image to a Private Docker registry</h2>
<p>The docker push offers the user the capability to upload the docker image on disk to be shared onto a remote docker registry / repository with username authorization.</p>
<p>The process to d<span data-sheets-value="{&quot;1&quot;:2,&quot;2&quot;:&quot;docker push to private repository&quot;}" data-sheets-userformat="{&quot;2&quot;:513,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0}">ocker push to private repository</span> is a simple command and takes the following syntax:</p>
<pre>[root@docker03:~]#  docker push [DOCKER-REGISTRY-NAME]/[DOCKER-IMAGE]:[TAG]</pre>
<p>This will now enable docker image to be pushed to the destined repository.</p>
<p>The syntax command to push the docker image to the destination repository.<br />
Example given:</p>
<pre>[root@docker03:~]#  docker push nexusreg.linuxcent.com:5000/nginx:v1</pre>
<h2>How do I push to Docker repository?</h2>
<p>To push an image to Docker Hub, you must first name your local image using your Docker Hub username and the repository name that you created through Docker Hub on the web. You can add multiple images to a repository by adding a specific :&lt;tag&gt; to them (for example docs/base:testing ).</p>
<h2>How do I use private Docker repository?</h2>
<p>Use a Private Docker Registry with the Docker Containerizer<br />
Step 1: Compress Docker credentials. Log in to the private registry manually. Login creates a ~/. &#8230;<br />
Step 2: Add URI path to app definition. Add the path to the archive file login credentials to the fetch parameter of your app definition.</p>
<h2>Is Docker repositories can be public or private?</h2>
<p>Public repositories can be used to host Docker images which can be used by everyone else. An example is the images which are available in Docker Hub. Most of the images such as Centos, Ubuntu, and Jenkins are all publicly available for all.</p>
<h2>How do I pull an image from Docker Hub private repository?</h2>
<p>In order to pull images from your private repository, you&#8217;ll need to login to Docker. If no registry URI is specified, Docker will assume you intend to use or log out from Docker Hub. Triton comes with several images built-in. You can view the available list with triton images</p>
<h2>What is Docker push command?</h2>
<p>Docker Push is a command that is used to push or share a local Docker image or a repository to a central repository; it might be a public registry like https://hub.docker.com or a private registry or a self-hosted registry.</p>
<h2>How do I push a Docker image to Git?</h2>
<p>In order to publish a container image on GitHub Container Registry using GitHub Actions, we have to do the following steps:</p>
<ul>
<li>Activate improved container support.</li>
<li>Create a personal access token (PAT) and a repository secret.</li>
<li>Create GitHub Actions workflow and login to GitHub Container Registry using the PAT.</li>
</ul>
<h2>Does Docker build push to registry?</h2>
<p>Once your application has been built into a Docker image, you&#8217;ll want to push it to a container registry for safe-keeping, ready for deployment. You&#8217;ll need to log into your container registry before pushing.</p>
<h2>How do I create a .dockercfg file?</h2>
<p>You can create this file by running docker login on your local system and entering your registry user name, password, and email address. You can also log in to a container instance and run the command there. Depending on your Docker version, this file is saved as either ~/. dockercfg or ~/.</p>
<h2>What is the difference between Docker repo and Docker registry?</h2>
<p>A Docker repository is where you can store 1 or more versions of a specific Docker image. An image can have 1 or more versions (tags). &#8230; It&#8217;s also worth pointing out that the Docker Hub and other third party repository hosting services are called “registries”. A registry stores a collection of repositories.</p>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-push-to-private-repository%2F&amp;linkname=How%20to%20push%20a%20docker%20image%20to%20a%20private%20repository" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-push-to-private-repository%2F&amp;linkname=How%20to%20push%20a%20docker%20image%20to%20a%20private%20repository" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-push-to-private-repository%2F&amp;linkname=How%20to%20push%20a%20docker%20image%20to%20a%20private%20repository" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-push-to-private-repository%2F&amp;linkname=How%20to%20push%20a%20docker%20image%20to%20a%20private%20repository" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-push-to-private-repository%2F&amp;linkname=How%20to%20push%20a%20docker%20image%20to%20a%20private%20repository" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-push-to-private-repository%2F&amp;linkname=How%20to%20push%20a%20docker%20image%20to%20a%20private%20repository" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fdocker-push-to-private-repository%2F&amp;linkname=How%20to%20push%20a%20docker%20image%20to%20a%20private%20repository" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fdocker-push-to-private-repository%2F&#038;title=How%20to%20push%20a%20docker%20image%20to%20a%20private%20repository" data-a2a-url="https://linuxcent.com/docker-push-to-private-repository/" data-a2a-title="How to push a docker image to a private repository"></a></p><p>The post <a href="https://linuxcent.com/docker-push-to-private-repository/">How to push a docker image to a private repository</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/docker-push-to-private-repository/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">524</post-id>	</item>
		<item>
		<title>Jenkins API Copy Jenkins Job</title>
		<link>https://linuxcent.com/jenkins-api/</link>
					<comments>https://linuxcent.com/jenkins-api/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Wed, 08 Mar 2023 03:45:35 +0000</pubDate>
				<category><![CDATA[Devops]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=325</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 2</span> <span class="rt-label rt-postfix">minutes</span></span>Using the Jenkins API is perhaps the most effective way of managing your Devops Tasks, Be it getting the job information, Finding the users information, Copying the jobs,  Creating new jobs, triggering the build on multiple jobs, Clearing the Queues, Creating Credentials, Installing a Plugin, safe restart of Jenkins and many more through the API ... <a title="Jenkins API Copy Jenkins Job" class="read-more" href="https://linuxcent.com/jenkins-api/" aria-label="Read more about Jenkins API Copy Jenkins Job">Read more</a></p>
<p>The post <a href="https://linuxcent.com/jenkins-api/">Jenkins API Copy Jenkins Job</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 2</span> <span class="rt-label rt-postfix">minutes</span></span><p>Using the Jenkins API is perhaps the most effective way of managing your Devops Tasks, Be it getting the job information, Finding the users information, Copying the jobs,  Creating new jobs, triggering the build on multiple jobs, Clearing the Queues, Creating Credentials, Installing a Plugin, safe restart of Jenkins and many more through the API for ease of Jenkins Administration.</p>
<h2>How to Copy a Jenkins job from Jenkins API?</h2>
<p>A job can be referenced in order to be copied and replicated any number of times from the Jenkins UI dashboard.</p>
<p>First up we navigate to the Jenkins dashboard and then navigate to New Item<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-336" src="https://linuxcent.com/wp-content/uploads/2020/04/New-Item-Selection-in-Jenkins.png" alt="" width="188" height="274" /><br />
Enter an item name <img loading="lazy" decoding="async" class="alignnone size-large wp-image-335" src="https://linuxcent.com/wp-content/uploads/2020/04/Jenkins-copy-job-name-1024x240.png" alt="Copy jenkins job name" width="1024" height="240" srcset="https://linuxcent.com/wp-content/uploads/2020/04/Jenkins-copy-job-name-1024x240.png 1024w, https://linuxcent.com/wp-content/uploads/2020/04/Jenkins-copy-job-name-300x70.png 300w, https://linuxcent.com/wp-content/uploads/2020/04/Jenkins-copy-job-name-768x180.png 768w, https://linuxcent.com/wp-content/uploads/2020/04/Jenkins-copy-job-name.png 1230w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><br />
-&gt; Go to the end of the page -&gt; Enter the job name to be copied from.<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-340" src="https://linuxcent.com/wp-content/uploads/2020/04/Choose-and-existing-job-name-in-jenkins.png" alt="" width="865" height="619" srcset="https://linuxcent.com/wp-content/uploads/2020/04/Choose-and-existing-job-name-in-jenkins.png 865w, https://linuxcent.com/wp-content/uploads/2020/04/Choose-and-existing-job-name-in-jenkins-300x215.png 300w, https://linuxcent.com/wp-content/uploads/2020/04/Choose-and-existing-job-name-in-jenkins-768x550.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /></p>
<p>The pattern name will be automatically matched from your typing and Jenkins auto suggests the source reference job name and click ok to proceed and then save in the next screen.</p>
<h2>Using the Jenkins API:</h2>
<p>We can use the jenkins API more effectively copy the job and create another job exact same preferences.<br />
The syntax for the Jenkins API call will be as follows:</p>
<pre>$ java -jar /tmp/jenkins-cli.jar -s http://jenkins.linuxcent.com:8080 -auth admin:admin copy-job SRC-JOB-NAME DST-JOB-NAME</pre>
<p>You can also update the passwords to a text file and then pass the credentials to -auth with @&lt;filename&gt;<br />
Know the Jenkins server version</p>
<pre>$ java -jar /tmp/jenkins-cli.jar -s http://jenkins.linuxcent.com:8080 -auth @passfile -version
Version: 2.222.1</pre>
<h2>How to Download the Jenkins jarfile ?</h2>
<p>If you are Unable to access jarfile <code>jenkins-cli.jar</code> on your jenkins server, Then you can download it from this URL path on your Jenkins Instance: http://YOUR-Jenkins-IP/<code>jnlpJars</code>/<code>jenkins-cli.jar</code></p>
<pre>$ wget http://YOUR-Jenkins-IP:8080/jnlpJars/jenkins-cli.jar -O /tmp/jenkins-cli.jar</pre>
<p>&nbsp;</p>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fjenkins-api%2F&amp;linkname=Jenkins%20API%20Copy%20Jenkins%20Job" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fjenkins-api%2F&amp;linkname=Jenkins%20API%20Copy%20Jenkins%20Job" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fjenkins-api%2F&amp;linkname=Jenkins%20API%20Copy%20Jenkins%20Job" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fjenkins-api%2F&amp;linkname=Jenkins%20API%20Copy%20Jenkins%20Job" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fjenkins-api%2F&amp;linkname=Jenkins%20API%20Copy%20Jenkins%20Job" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fjenkins-api%2F&amp;linkname=Jenkins%20API%20Copy%20Jenkins%20Job" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fjenkins-api%2F&amp;linkname=Jenkins%20API%20Copy%20Jenkins%20Job" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fjenkins-api%2F&#038;title=Jenkins%20API%20Copy%20Jenkins%20Job" data-a2a-url="https://linuxcent.com/jenkins-api/" data-a2a-title="Jenkins API Copy Jenkins Job"></a></p><p>The post <a href="https://linuxcent.com/jenkins-api/">Jenkins API Copy Jenkins Job</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/jenkins-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">325</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 

Served from: linuxcent.com @ 2026-06-30 15:53:22 by W3 Total Cache
-->