ArgoCD App of Apps with Heml on Kubernetes simplified by our in-house experts.
At Bobcares, we offer solutions for every query, big and small, as a part of our Docker Hosting Support Service.
Let’s take a look at how our Support Team is ready to help customers with ArgoCD App of Apps with Heml on Kubernetes.
All About ArgoCD App of Apps with Heml on Kubernetes
App of Apps pattern allows us to define a root ArgoCD application. It allows the Root App to point to the folder that contains the application YAML definition for each child App (microservice). Furthermore, each child App’s Application YAML points to the directory with the application manifests.
According to our Support Techs, the root application is responsible for one main task. It has to generate Application manifests for other applications. Additionally, ArgoCD watches the root application as well as synchronizes any application it generates.
This is where we create a Helm chart for the Root App with the Application manifests as templates.
Our Support Team recommends creating it in an apps directory and then adding a Chart.yaml file as well as an empty values.yaml file to it.
$ mkdir -p apps/templates $ touch apps/values.yaml
apps/Chart.yaml:
apiVersion: v2 name: root version: 1.0.0
At this point, the Application manifest for the application is in apps/templates/root.yaml. This permits us to update the root application via ArgoCD.
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: root finalizers: - resources-finalizer.argocd.argoproj.io spec: destination: server: https://kubernetes.default.svc namespace: default project: default source: path: apps/ repoURL: https://github.com/arthurk/argocd-example-install.git targetRevision: HEAD syncPolicy: automated: prune: true selfHeal: true
The Application keeps track of the Helm chart under the root application and synchronizes if any changes occur.
ArgoCD uses Helm 3 to render the chart. This is done with the helm template and kubectl commands.
In order to deploy the root application, we have to push the files to the git repository and then apply the manifest.
$ git add apps $ git commit -m "add apps" $ git push -u origin main $ helm template apps/ | kubectl apply -f - application.argoproj.io/root created $ tree ../charts ../charts ├── apps │ ├── Chart.yaml │ ├── templates │ │ └── root.yaml │ └── values.yaml └── argo-cd ├── Chart.lock ├── Chart.yaml ├── charts │ └── argo-cd-2.11.0.tgz ├── templates └── values.yaml
We can avoid running helm upgrade command by creating an Application resource for ArgoCD and allowing it to manage itself. This permits updates to occur by modifying files in the git repository rather than manually running commands.
Here we add the application manifest in apps/templates/argo-cd.yaml:
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: argo-cd namespace: default finalizers: - resources-finalizer.argocd.argoproj.io spec: destination: server: https://kubernetes.default.svc namespace: default project: default source: path: charts/argo-cd repoURL: https://github.com/arthurk/argocd-example-install.git targetRevision: HEAD syncPolicy: automated: prune: true selfHeal: true
Our Support Techs then recommend pushing the file to the git repository with these commands:
$ vi apps/templates/argo-cd.yaml $ git add apps/templates/argo-cd.yaml $ git commit -m "add argo-cd application"
Adding Prometheus to the cluster allows us to see how to deploy a Helm chart with ArgoCD. This involves adding the application manifest in apps/templates/prometheus.yaml:
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: prometheus namespace: default finalizers: - resources-finalizer.argocd.argoproj.io spec: destination: server: https://kubernetes.default.svc namespace: default project: default source: chart: prometheus helm: values: | pushgateway: enabled: false repoURL: https://prometheus-community.github.io/helm-charts targetRevision: 13.0.2 syncPolicy: automated: prune: true selfHeal: true
Then we push the manifest to the repository in order to deploy the application:
$ git add apps/templates/prometheus.yaml $ git commit -m "add prometheus app" $ git push origin main
[Looking for a solution to another query? We are just a click away.]
Conclusion
In brief, our skilled Support Engineers at Bobcares demonstrated how to deal with ArgoCD App of Apps with Heml on Kubernetes.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments