<div class="wpcnt">
			<div class="wpa">
				<span class="wpa-about">Advertisements</span>
				<div class="u top_amp">
							<amp-ad width="300" height="265"
		 type="pubmine"
		 data-siteid="9896746"
		 data-section="1">
		</amp-ad>
				</div>
			</div>
		</div><div class="cs-rating pd-rating" id="pd_rating_holder_594384_post_2046"></div>
<script type="text/javascript" charset="UTF-8"><!--//--><![CDATA[//><!--
PDRTJS_settings_594384_post_2046={"id":594384,"unique_id":"wp-post-2046","title":"Step%20by%20step%20guide%20for%20exposing%20ArgoCD%20using%20kubernetes%20ingress%20after%20installing%20ArgoCD%20in%20EKS.","permalink":"https:\/\/kaungmyattun.com\/2023\/10\/05\/step-by-step-guide-for-exposing-argocd-using-kubernetes-ingress-after-installing-argocd-in-eks\/","item_id":"_post_2046"};
//--><!]]></script>
<script type="text/javascript" charset="UTF-8" src="https://polldaddy.com/js/rating/rating.js"></script>

<p class="wp-block-paragraph">To expose ArgoCD using Kubernetes Ingress after installing ArgoCD in Amazon EKS (Elastic Kubernetes Service), follow these step-by-step instructions:</p>



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



<ul class="wp-block-list">
<li>You have installed ArgoCD in your EKS cluster.</li>



<li>You have <code>kubectl</code> and <code>eksctl</code> installed on your local machine.</li>



<li>You have a domain name that you want to use for accessing ArgoCD, and you&#8217;ve configured the DNS to point to your EKS cluster&#8217;s Ingress controller.</li>
</ul>



<p class="wp-block-paragraph"><strong>Step 1: Deploy the Ingress Controller (if not already deployed)</strong></p>



<p class="wp-block-paragraph">If you don&#8217;t have an Ingress controller deployed in your cluster, you can deploy one. For example, you can deploy the Nginx Ingress controller:</p>



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



<p class="wp-block-paragraph"><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/cloud/deploy.yaml</code></p>



<p class="wp-block-paragraph">Make sure the Ingress controller is running successfully. You should see pods in the <code>ingress-nginx</code> namespace.</p>



<p class="wp-block-paragraph"><strong>Step 2: Create an Ingress Resource for ArgoCD</strong></p>



<p class="wp-block-paragraph">Create an Ingress resource that specifies how incoming traffic should be routed to ArgoCD&#8217;s services. Create a YAML file (e.g., <code>argocd-ingress.yaml</code>) with the following content:</p>



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



<p class="wp-block-paragraph">apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>name: argocd-ingress<br>annotations:<br>kubernetes.io/ingress.class: &#8220;nginx&#8221; <br># Use the appropriate Ingress class if not Nginx<br>spec:<br>rules:<br>&#8211; host: argocd.example.com # Replace with your domain or hostname<br>http:<br>paths:<br>&#8211; path: /<br>pathType: Prefix<br>backend:<br>service:<br>name: argocd-server # ArgoCD service name<br>port:<br>number: 443 # Port number for HTTPS<br>tls:<br>&#8211; hosts:<br>&#8211; argocd.example.com # Replace with your domain or hostname<br>secretName: argocd-tls-secret # TLS secret with your certificate</p>



<p class="wp-block-paragraph">Replace the following values:</p>



<ul class="wp-block-list">
<li><code>host</code>: Set this to your desired domain or hostname.</li>



<li><code>name</code>: The name of the Ingress resource.</li>



<li><code>service.name</code>: The name of the ArgoCD service.</li>



<li><code>tls.secretName</code>: The name of the TLS secret. You should have a TLS certificate and key in a Kubernetes secret.</li>
</ul>



<p class="wp-block-paragraph">Apply the Ingress resource:</p>



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



<p class="wp-block-paragraph"><code>kubectl apply -f argocd-ingress.yaml</code></p>



<p class="wp-block-paragraph"><strong>Step 3: Verify the Ingress</strong></p>



<p class="wp-block-paragraph">Verify that the Ingress resource has been created successfully:</p>



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



<p class="wp-block-paragraph"><code>kubectl get ingress argocd-ingress</code></p>



<p class="wp-block-paragraph">It should show the Ingress resource you just created.</p>



<p class="wp-block-paragraph"><strong>Step 4: DNS Configuration</strong></p>



<p class="wp-block-paragraph">Ensure that your DNS records are correctly configured to point to the IP address or hostname of your Ingress controller. This step might take some time to propagate.</p>



<p class="wp-block-paragraph"><strong>Step 5: Access ArgoCD</strong></p>



<p class="wp-block-paragraph">Wait for the DNS changes to propagate (which can take some time), and then access ArgoCD via the domain or hostname you configured in the Ingress resource. For example:</p>



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



<figure class="wp-block-embed"><div class="wp-block-embed__wrapper">
https://argocd.example.com
</div></figure>



<p class="wp-block-paragraph">You should be able to access the ArgoCD web UI securely via HTTPS.</p>



<p class="wp-block-paragraph">By following these steps, you&#8217;ve exposed ArgoCD using Kubernetes Ingress on your Amazon EKS cluster, allowing you to access ArgoCD through a custom domain or hostname.</p>

