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

To expose ArgoCD using Kubernetes Ingress after installing ArgoCD in Amazon EKS (Elastic Kubernetes Service), follow these step-by-step instructions:

Prerequisites:

  • You have installed ArgoCD in your EKS cluster.
  • You have kubectl and eksctl installed on your local machine.
  • You have a domain name that you want to use for accessing ArgoCD, and you’ve configured the DNS to point to your EKS cluster’s Ingress controller.

Step 1: Deploy the Ingress Controller (if not already deployed)

If you don’t have an Ingress controller deployed in your cluster, you can deploy one. For example, you can deploy the Nginx Ingress controller:

bashCopy code

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/cloud/deploy.yaml

Make sure the Ingress controller is running successfully. You should see pods in the ingress-nginx namespace.

Step 2: Create an Ingress Resource for ArgoCD

Create an Ingress resource that specifies how incoming traffic should be routed to ArgoCD’s services. Create a YAML file (e.g., argocd-ingress.yaml) with the following content:

yaml

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd-ingress
annotations:
kubernetes.io/ingress.class: “nginx”
# Use the appropriate Ingress class if not Nginx
spec:
rules:
– host: argocd.example.com # Replace with your domain or hostname
http:
paths:
– path: /
pathType: Prefix
backend:
service:
name: argocd-server # ArgoCD service name
port:
number: 443 # Port number for HTTPS
tls:
– hosts:
– argocd.example.com # Replace with your domain or hostname
secretName: argocd-tls-secret # TLS secret with your certificate

Replace the following values:

  • host: Set this to your desired domain or hostname.
  • name: The name of the Ingress resource.
  • service.name: The name of the ArgoCD service.
  • tls.secretName: The name of the TLS secret. You should have a TLS certificate and key in a Kubernetes secret.

Apply the Ingress resource:

bashCopy code

kubectl apply -f argocd-ingress.yaml

Step 3: Verify the Ingress

Verify that the Ingress resource has been created successfully:

bashCopy code

kubectl get ingress argocd-ingress

It should show the Ingress resource you just created.

Step 4: DNS Configuration

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.

Step 5: Access ArgoCD

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:

arduinoCopy code

https://argocd.example.com

You should be able to access the ArgoCD web UI securely via HTTPS.

By following these steps, you’ve exposed ArgoCD using Kubernetes Ingress on your Amazon EKS cluster, allowing you to access ArgoCD through a custom domain or hostname.

Leave a Reply

Discover more from Kaung Myat Tun

Subscribe now to keep reading and get access to the full archive.

Continue reading