For deploy ArgoCD to K3S, we can use official installation guide from ArgoCD.

In my case, I use K3S with Traefik as Ingress Controller.

So, let’s deploy ArgoCD to K3S.

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

After create configmap for ArgoCD:

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: argocd
  name: argocd-cmd-params-cm
  labels:
    app.kubernetes.io/name: argocd-cmd-params-cm
    app.kubernetes.io/part-of: argocd
data:
  server.insecure: "true"

And apply it:

kubectl apply -f argocd-cmd-params-cm.yaml
kubectl -n argocd rollout restart deployment/argocd-server

Now, we need to create Ingress for ArgoCD:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  namespace: argocd
  name: argocd-server-ingress
spec:
  ingressClassName: traefik
  rules:
    - host: argocd.example.com
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: argocd-server
              port:
                name: http

And apply it:

kubectl apply -f argocd-server-ingress.yaml

Now, we can access ArgoCD via argocd.example.com.

For login, we can use default username admin and password we can get from secret:

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

That’s it. Now we have ArgoCD deployed to K3S.

Unsinatll ArgoCD

For uninstall ArgoCD, we can use:

kubectl delete namespace argocd

If you use finalizers, you need to remove them manually.

kubectl -n argocd get applications --no-headers -o custom-columns=":metadata.name" | xargs -I {} kubectl -n argocd patch application {} --type=json -p='[{"op": "remove", "path": "/metadata/finalizers"}]'

All deployed application will remain in the form in which they worked. You can delete them manually.

For example - remove all applications from namespace default:

kubectl -n default  delete all --all