Site icon Kaung Myat Tun

Step by step guide for exposing ArgoCD using kubernetes ingress after installing ArgoCD in EKS.

&Tab;&Tab;<div class&equals;"wpcnt">&NewLine;&Tab;&Tab;&Tab;<div class&equals;"wpa">&NewLine;&Tab;&Tab;&Tab;&Tab;<span class&equals;"wpa-about">Advertisements<&sol;span>&NewLine;&Tab;&Tab;&Tab;&Tab;<div class&equals;"u top&lowbar;amp">&NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;<amp-ad width&equals;"300" height&equals;"265"&NewLine;&Tab;&Tab; type&equals;"pubmine"&NewLine;&Tab;&Tab; data-siteid&equals;"9896746"&NewLine;&Tab;&Tab; data-section&equals;"1">&NewLine;&Tab;&Tab;<&sol;amp-ad>&NewLine;&Tab;&Tab;&Tab;&Tab;<&sol;div>&NewLine;&Tab;&Tab;&Tab;<&sol;div>&NewLine;&Tab;&Tab;<&sol;div><div class&equals;"cs-rating pd-rating" id&equals;"pd&lowbar;rating&lowbar;holder&lowbar;594384&lowbar;post&lowbar;2046"><&sol;div>&NewLine;<script type&equals;"text&sol;javascript" charset&equals;"UTF-8"><&excl;--&sol;&sol;--><&excl;&lbrack;CDATA&lbrack;&sol;&sol;><&excl;--&NewLine;PDRTJS&lowbar;settings&lowbar;594384&lowbar;post&lowbar;2046&equals;&lbrace;"id"&colon;594384&comma;"unique&lowbar;id"&colon;"wp-post-2046"&comma;"title"&colon;"Step&percnt;20by&percnt;20step&percnt;20guide&percnt;20for&percnt;20exposing&percnt;20ArgoCD&percnt;20using&percnt;20kubernetes&percnt;20ingress&percnt;20after&percnt;20installing&percnt;20ArgoCD&percnt;20in&percnt;20EKS&period;"&comma;"permalink"&colon;"https&colon;&bsol;&sol;&bsol;&sol;kaungmyattun&period;com&bsol;&sol;2023&bsol;&sol;10&bsol;&sol;05&bsol;&sol;step-by-step-guide-for-exposing-argocd-using-kubernetes-ingress-after-installing-argocd-in-eks&bsol;&sol;"&comma;"item&lowbar;id"&colon;"&lowbar;post&lowbar;2046"&rcub;&semi;&NewLine;&sol;&sol;--><&excl;&rsqb;&rsqb;><&sol;script>&NewLine;<script type&equals;"text&sol;javascript" charset&equals;"UTF-8" src&equals;"https&colon;&sol;&sol;polldaddy&period;com&sol;js&sol;rating&sol;rating&period;js"><&sol;script>&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">To expose ArgoCD using Kubernetes Ingress after installing ArgoCD in Amazon EKS &lpar;Elastic Kubernetes Service&rpar;&comma; follow these step-by-step instructions&colon;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><strong>Prerequisites&colon;<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<ul class&equals;"wp-block-list">&NewLine;<li>You have installed ArgoCD in your EKS cluster&period;<&sol;li>&NewLine;&NewLine;&NewLine;&NewLine;<li>You have <code>kubectl<&sol;code> and <code>eksctl<&sol;code> installed on your local machine&period;<&sol;li>&NewLine;&NewLine;&NewLine;&NewLine;<li>You have a domain name that you want to use for accessing ArgoCD&comma; and you&&num;8217&semi;ve configured the DNS to point to your EKS cluster&&num;8217&semi;s Ingress controller&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><strong>Step 1&colon; Deploy the Ingress Controller &lpar;if not already deployed&rpar;<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">If you don&&num;8217&semi;t have an Ingress controller deployed in your cluster&comma; you can deploy one&period; For example&comma; you can deploy the Nginx Ingress controller&colon;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">bashCopy code<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><code>kubectl apply -f https&colon;&sol;&sol;raw&period;githubusercontent&period;com&sol;kubernetes&sol;ingress-nginx&sol;controller-v1&period;1&period;1&sol;deploy&sol;static&sol;provider&sol;cloud&sol;deploy&period;yaml<&sol;code><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">Make sure the Ingress controller is running successfully&period; You should see pods in the <code>ingress-nginx<&sol;code> namespace&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><strong>Step 2&colon; Create an Ingress Resource for ArgoCD<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">Create an Ingress resource that specifies how incoming traffic should be routed to ArgoCD&&num;8217&semi;s services&period; Create a YAML file &lpar;e&period;g&period;&comma; <code>argocd-ingress&period;yaml<&sol;code>&rpar; with the following content&colon;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">yaml<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">apiVersion&colon; networking&period;k8s&period;io&sol;v1<br>kind&colon; Ingress<br>metadata&colon;<br>name&colon; argocd-ingress<br>annotations&colon;<br>kubernetes&period;io&sol;ingress&period;class&colon; &&num;8220&semi;nginx&&num;8221&semi; <br>&num; Use the appropriate Ingress class if not Nginx<br>spec&colon;<br>rules&colon;<br>&&num;8211&semi; host&colon; argocd&period;example&period;com &num; Replace with your domain or hostname<br>http&colon;<br>paths&colon;<br>&&num;8211&semi; path&colon; &sol;<br>pathType&colon; Prefix<br>backend&colon;<br>service&colon;<br>name&colon; argocd-server &num; ArgoCD service name<br>port&colon;<br>number&colon; 443 &num; Port number for HTTPS<br>tls&colon;<br>&&num;8211&semi; hosts&colon;<br>&&num;8211&semi; argocd&period;example&period;com &num; Replace with your domain or hostname<br>secretName&colon; argocd-tls-secret &num; TLS secret with your certificate<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">Replace the following values&colon;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<ul class&equals;"wp-block-list">&NewLine;<li><code>host<&sol;code>&colon; Set this to your desired domain or hostname&period;<&sol;li>&NewLine;&NewLine;&NewLine;&NewLine;<li><code>name<&sol;code>&colon; The name of the Ingress resource&period;<&sol;li>&NewLine;&NewLine;&NewLine;&NewLine;<li><code>service&period;name<&sol;code>&colon; The name of the ArgoCD service&period;<&sol;li>&NewLine;&NewLine;&NewLine;&NewLine;<li><code>tls&period;secretName<&sol;code>&colon; The name of the TLS secret&period; You should have a TLS certificate and key in a Kubernetes secret&period;<&sol;li>&NewLine;<&sol;ul>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">Apply the Ingress resource&colon;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">bashCopy code<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><code>kubectl apply -f argocd-ingress&period;yaml<&sol;code><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><strong>Step 3&colon; Verify the Ingress<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">Verify that the Ingress resource has been created successfully&colon;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">bashCopy code<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><code>kubectl get ingress argocd-ingress<&sol;code><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">It should show the Ingress resource you just created&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><strong>Step 4&colon; DNS Configuration<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">Ensure that your DNS records are correctly configured to point to the IP address or hostname of your Ingress controller&period; This step might take some time to propagate&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph"><strong>Step 5&colon; Access ArgoCD<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">Wait for the DNS changes to propagate &lpar;which can take some time&rpar;&comma; and then access ArgoCD via the domain or hostname you configured in the Ingress resource&period; For example&colon;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">arduinoCopy code<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-embed"><div class&equals;"wp-block-embed&lowbar;&lowbar;wrapper">&NewLine;https&colon;&sol;&sol;argocd&period;example&period;com&NewLine;<&sol;div><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">You should be able to access the ArgoCD web UI securely via HTTPS&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p class&equals;"wp-block-paragraph">By following these steps&comma; you&&num;8217&semi;ve exposed ArgoCD using Kubernetes Ingress on your Amazon EKS cluster&comma; allowing you to access ArgoCD through a custom domain or hostname&period;<&sol;p>&NewLine;

Exit mobile version