Skip to main content

Deploying an application

Manifests​

Traditional way​

kubectl apply -f manifest.yaml

GitOps way​

  1. Choose project to deploy the application

    For example, agrospai project. If the project is not created, check Adding a new project.

  2. Create the application in manifests/default/argo-cd/projects/agrospai/applications/{{application}}. Check Adding a new application.

  3. Add the manifests files in manifests/system/{{application}}.

  4. Push the changes to the repository.

Helm​

Example with cert-manager.

Search repo​

helm search repo jetstack/cert-manager

NAME CHART VERSION APP VERSION DESCRIPTION
jetstack/cert-manager v1.16.1 v1.16.1 A Helm chart for cert-manager

Note: The version used in the next steps is the CHART VERSION.

Download the repo​

helm repo add jetstack https://charts.jetstack.io --force-update

Customize the values​

helm show values jetstack/cert-manager --version v1.16.1 > values.yaml

Check template​

helm template cert-manager jetstack/cert-manager --version v1.16.1 -f values.yaml --namespace cert-manager --create-namespace > template.yaml

Install​

Traditional way​

helm install cert-manager jetstack/cert-manager --version v1.16.1 -f values.yaml --namespace cert-manager --create-namespace

GitOps way​

  1. Choose project to deploy the application

    We will deploy cert-manager in system project. If the project is not created, check Adding a new project.

  2. In manifests/default/argo-cd/projects/system/applications/cert-manager/:

    a. Add the values.yaml file.

    a. Add the cert-manager.yaml file. Check Adding a new application. `yaml apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: cert-manager namespace: argo-cd spec: project: system sources:

  3. In manifests/system/cert-manager add your custom manifests.

  4. Push the changes to the repository.