Deploy ArgoCD and a first App on Kubernetes

Deploy ArgoCD and a first App on Kubernetes

ArgoCD is a must try GitOps continuous delivery tool for Kubernetes.

In this story we will show you how to deploy ArgoCD on Kubernetes and then deploy your first application using it.

Installing ArgoCD on your Kubernetes cluster is as simple as this:

kubectl create namespace argocd
kubectl apply -n argocd -f

If your Kubernetes cluster is running on a public cloud or using a loadbalancer service (like MetalLB) you will want to configure ArgoCD service as type LoadBalancer with the following command.

kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'

If you are not using a loadbalancing service you can configure an ingress rule like the one bellow. The annotation ssl-passthrough is mandatory because Argo CD serves multiple protocols (gRPC/HTTPS) on the same port (443).

apiVersion: extensions/v1beta1
kind: Ingress
  name: argocd-server-ingress
  namespace: argocd
  annotations: nginx "true" "true"
  - host:
      - backend:
          serviceName: argocd-server
          servicePort: https

The initial ArgoCD default admin password is the name of the argocd-server pod. You can retrieve it with the command

kubectl get pods -n argocd -l -o name | cut -d'/' -f 2

To change the admin password you will need to use the argocd CLI. You can find the installation information here :

Update the admin password with the two argocd CLI commands below

argocd login <ARGOCD_SERVER_IP_OR_URL>
argocd account update-password

Access the ArgoCD URL using https and login with the admin username and the new admin password.


The first step is to register the Kubernetes cluster on which one you will want to deploy your application. You can register multiple Kubernetes clusters in one ArgoCD instance. By default the local cluster on which you deployed ArgoCD is registered.


ArgoCD is a GitOps tool so the next step is to give it access to your Git repository that hosts your project.


Then we will deploy an application, using the GitOps methodology. In this example we will use a public repository that hosts a demo application.

Create a new App


In the General section we will give a custom application name and use the default project that allows us to deploy from any git repository to any Kubernetes cluster. The sync policy is set to Manual by default. This means that you will need to manually click on the Sync button if you want to apply the commits from Git to the Application.


In the source section you need to specify the source Git repository URL, with the .git suffix, and then the path that contains the application that we want to deploy.


Finally we tell to ArgoCD where we want to deploy this application. We will let the Directory section with the default values.


Now you can see that the application has the status Missing and OutOfSync because we have configured a Manual sync policy.


Click on the application to display the details and SYNC it to deploy the application to the cluster.


Your application is now SYNCED between the Git repository and your Kubernetes cluster.


If you use a Git repository that you own as the source, try now to change some code in it and check the sync status in ArgoCD. Try also to enable the AUTO-SYNC policy in your application to let ArgoCD automatically apply new commits to your deployment on Kubernetes.

Et voilà! You are ready to go with GitOps


Feel free to comment this article if you have some question.