Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageshell
titleShell Command
kubectl -n kubernetes-dashboard describe secret dashboard-sa-token




Install Argo CD

Install Argo CD in the argocd namespace:

Code Block
languageshell
titleShell Command
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml




Expose Argo CD with an Ingress

🔹 Ingress with NGINX

Create a file argocd-ingress.yaml:

prepare argocd_ingress.yaml

Code Block
languageyaml
titleargocd_ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: argocd-server-ingress
  namespace: argocd
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
    cert-manager.io/cluster-issuer: "letsencrypt-prod"   # Optional: if using TLS
spec:
  rules:
  - host: argocd.da       # 🔁 Replace with your DNS name
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: argocd-server
            port:
              number: 443
  tls:
  - hosts:
    - argocd.da
    secretName: argocd-tls          # Auto-created by cert-manager if using TLS



Apply it:

Code Block
languageshell
titleRKE
kubectl apply -f argocd-ingress.yaml


Create a Permanent Token for Login

🔹 1. Create a ServiceAccount

Code Block
languageshell
titleRKE
kubectl -n argocd create serviceaccount argocd-admin-sa

Bind It to Argo CD Admin Role

Code Block
languageshell
titleRKE
kubectl -n argocd create rolebinding argocd-admin-rb --role=admin --serviceaccount=argocd:argocd-admin-sa


Create a Secret-based Token

Create this file: argocd-token.yaml


Code Block
languageyaml
titlemanifest
apiVersion: v1
kind: Secret
metadata:
  name: argocd-admin-token
  namespace: argocd
  annotations:
    kubernetes.io/service-account.name: argocd-admin-sa
type: kubernetes.io/service-account-token

...

Code Block
languageshell
titleShell Command
kubectl -n argocd describe secret argocd-admin-token


Check the address exposed and add in the /etc/hosts as argocd.da
Shell Command

Code Block
languageshell
titleShell Command
kubectl get ingress -n argocd



🧠 You must configure a DNS entry or /etc/hosts pointing argocd.da to your ingress controller IP.

...