This exercise demonstrates the usage of Helm charts in Argo CD. Follow these steps:
Solution
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
kubectl apply -f helm-app.yaml -n argocd
kubectl get application -n argocd
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
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
kubectl apply -f helm-app.yaml -n argocd
kubectl get application -n argocd