Skip to content

Latest commit

 

History

History
93 lines (73 loc) · 1.79 KB

HELM.md

File metadata and controls

93 lines (73 loc) · 1.79 KB

HELM in ArgoCD

This exercise demonstrates the usage of Helm charts in Argo CD. Follow these steps:

Solution

1. Create an Argo CD Application Declaratively Using YAML

Example Manifest:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: 
  name: helm-app
  namespace: argocd
spec: 
  destination: 
    namespace: helm-app
    server: "https://kubernetes.default.svc"
  project: default
  source: 
    path: helm-guestbook
    repoURL: "https://github.com/spy86/argocd-example-apps.git"
    targetRevision: master
  syncPolicy:
    syncOptions:
      - CreateNamespace=true

2. Apply this Manifest with kubectl

kubectl apply -f helm-app.yaml -n argocd

3. Verify App

kubectl get application -n argocd

4. Retrieve the admin password for ArgoCD WebUI

kubectl port-forward svc/argocd-server -n argocd 8080:443
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo

5. Log in to UI and Click Sync

6. Update Helm Release Name

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: 
  name: helm-app
  namespace: argocd
spec: 
  destination: 
    namespace: helm-app
    server: "https://kubernetes.default.svc"
  project: default
  source: 
    path: helm-guestbook
    repoURL: "https://github.com/spy86/argocd-example-apps.git"
    targetRevision: master
    helm:
      releaseName: my-release
  syncPolicy:
    syncOptions:
      - CreateNamespace=true

7. Apply this Manifest with kubectl

kubectl apply -f helm-app.yaml -n argocd

8. Verify App

kubectl get application -n argocd

9. Go to UI and Re-Sync the Application and Select prune Option to Delete Old Resources with Old Names