Install ArgoCD on kubernetes

install ArgoCD using the official manifest files provided by the ArgoCD team.

kubectl create namespace argocd
kubectl apply -n argocd -f <https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml>

This will create a new namespace, argocd, where Argo CD services and application resources will live.

This command installs all the necessary ArgoCD components, including the API server, controller, and UI.

Verify the Installation

To check if ArgoCD is running correctly, use the following command:

kubectl get pods -n argocd

All pods should be in a Running state.

create service to expose argocd to external service

#nano argocdService.yaml

add the following code.

apiVersion: v1
kind: Service
metadata:
  annotations:
  labels:
    app.kubernetes.io/component: server
    app.kubernetes.io/name: argocd-server
    app.kubernetes.io/part-of: argocd
  name: argocd-server-nodeport
  namespace: argocd
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 8080
    nodePort: 30007
  - name: https
    port: 443
    protocol: TCP
    targetPort: 8080
    nodePort: 30008
  selector:
    app.kubernetes.io/name: argocd-server
  sessionAffinity: None
  type: NodePort

Accessing the ArgoCD Dashboard.

The default username is admin, and to retrieve the password, use:

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=”{.data.password}” | base64 -d

Leave a Reply

Your email address will not be published. Required fields are marked *