Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

Getting Started with Argo CD on Docker Desktop

4 min read

DevOps is a way for development and operations teams to work together collaboratively. It is basically a cultural change. Organizations adopt DevOps culture in order to be able to produce new applications and services at high velocity. To achieve high velocity and fast innovation, GitOps was born. GitOps gives you tools and a framework to take DevOps practices, like collaboration, CI/CD, and version control, and apply them to infrastructure automation and application deployment.

DevOps Culture may use GitOps, that’s not mandatory!

GitOps is a Continuous Deployment model for cloud-native applications. It is used to automate the process of provisioning infrastructure. GitOps is based-off of a Git-based source code management system. It is not a single product, plugin, or platform.

GitOps basically requires 3 core components:

GitOps = IaC + Merge Requests + CI-CD

In GitOps, the Git repositories contains the declarative descriptions of the infrastructure. These are considered as the single source of truth for the desired state of the system. One needs to have an automated way to ensure that the deployed state of the system always matches the state defined in the Git repository. All the changes (such as deployment, upgrade and rollback) on the environment are triggered by changes (commits) made on the Git repository. Said that, just having versioned controlled infrastructure as code doesn’t mean GitOps, we also need to have a mechanism in place to keep (try to keep) our deployed state in sync with the state we define in the Git repository.

GitOps is not limited to Kubernetes. In principle, you can use any infrastructure that can be observed and described declaratively, and has Infrastructure as Code tools available. However, currently most operators for pull-based GitOps are implemented with Kubernetes in mind.

Argo CD is a continuous delivery tool that works on the principles of GitOps. It is built specifically for Kubernetes. The product was developed and open-sourced by Intuit and is currently a part of CNCF.

Components of Argo CD

Argo CD consists of the three main components – API server, Repository Server, and Application Controller.

API Server ( pod: argcocd-server)

  • Controls the whole ArgoCD instance, all its operations, authentification, and secrets access which are stored as Kubernetes Secrets, etc

Repository Server ( pod: argocd-repo-server)

  • Stores and synchronizes data from configured Git-repositories and generates Kubernetes manifests

Application Controller ( pod: argocd-application-controller)

  • Used to monitor applications in a Kubernetes cluster to make them the same as they are described in a repository, and controls PreSync, Sync, PostSync hooks

Argo CD is a tool that will help read your environment configuration from your git repository and apply it to your Kubernetes namespaces.  App definitions, environment, and configurations should be declarative and version controlled. App deployment and lifecycle management should be automated, audible, and easy to understand.Argo CD uses a Git repo to express the desired state of the Kubernetes environment. The basic setup uses one repository to represent one project. Within that repository, each application that makes up the project will be described in its own folder. The repository will also contain a branch for each destination (i.e. cluster and namespace) into which we want to deploy the applications.



– Install Docker Desktop

Visit https://docs.docker.com/desktop/mac/install/ to setup Docker Desktop for Mac or Windows on your local system.

– Enable Kubernetes

Ensure that the checkbox for Kubernetes is enabled under Desktop Desktop Preference UI.

Getting Started

Step 1. Create a new namespace

Create a namespace argocd where all ArgoCD resources will be installed

kubectl create namespace argocd

Step 2. Install ArgoCD resources

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl get po -n argocd
NAME                                  READY   STATUS              RESTARTS   AGE
argocd-application-controller-0       0/1     ContainerCreating   0          3m9s
argocd-dex-server-65bf5f4fc7-5kjg6    0/1     Init:0/1            0          3m13s
argocd-redis-d486999b7-929q9          0/1     ContainerCreating   0          3m13s
argocd-repo-server-8465d84869-rpr9n   0/1     Init:0/1            0          3m12s
argocd-server-87b47d787-gxwlb         0/1     ContainerCreating   0          3m11s

Step 3. Ensure that all Pods are up and running

kubectl get po -n argocd
NAME                                  READY   STATUS    RESTARTS   AGE
argocd-application-controller-0       1/1     Running   0          5m25s
argocd-dex-server-65bf5f4fc7-5kjg6    1/1     Running   0          5m29s
argocd-redis-d486999b7-929q9          1/1     Running   0          5m29s
argocd-repo-server-8465d84869-rpr9n   1/1     Running   0          5m28s
argocd-server-87b47d787-gxwlb         1/1     Running   0          5m27s

Step 4. Configuring Port Forwarding for Dashboard Access

kubectl port-forward svc/argocd-server -n argocd 8080:443
Forwarding from -> 8080
Forwarding from [::1]:8080 -> 8080

Open the browser and type https://localhost:8080 to access the ArgoCD dashboard.

To login, you will need admin password. Follow the below steps to get the admin password.


Step 5. Logging in

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo

Once you run the above command, you will get the admin password that you can use to login into the ArgoCD dashboard.


Step 6. Install argoCD CLI on Mac using Homebrew

brew install argocd

Step 7. Access The Argo CD API Server

By default, the Argo CD API server is not exposed with an external IP. To access the API server, choose one of the following techniques to expose the Argo CD API server:

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

Step 8. Login to ArgoCD

argocd login localhost      
WARNING: server certificate had error: x509: certificate signed by unknown authority. Proceed insecurely (y/n)? y
Username: admin
'admin:login' logged in successfully
Context 'localhost' updated

Step 9. Update the password

% argocd account update-password
*** Enter password of currently logged in user (admin):                       
*** Enter new password for user admin: 
*** Confirm new password for user admin: 
Password updated
Context 'localhost' updated
ajeetraina@Ajeets-MacBook-Pro ~ % 

Step 10. Register A Cluster To Deploy Apps To

As we are running it on Docker Desktop, we will add it accordingly.

argocd cluster add docker-desktop
WARNING: This will create a service account `argocd-manager` on the cluster referenced by context `docker-desktop` with full cluster level admin privileges. Do you want to continue [y/N]? y
INFO[0002] ServiceAccount "argocd-manager" created in namespace "kube-system" 
INFO[0002] ClusterRole "argocd-manager-role" created    
INFO[0002] ClusterRoleBinding "argocd-manager-role-binding" created 
Cluster 'https://kubernetes.docker.internal:6443' added

Step 11. Deploy a Sample Application

The ArgoCD GitHub repository contains example applications for demoing ArgoCD functionality. You can register this repository to your ArgoCD instance, or fork this repo and push your own commits to explore ArgoCD and GitOps!

Let us pick up Sock shop sample app for our demo purpose. Sock Shop simulates the user-facing part of an e-commerce website that sells socks. It is intended to aid the demonstration and testing of microservice and cloud native technologies.

Sock Shop microservices are designed to have minimal expectations, using DNS to find other services. This means that it is possible to insert load-balancers and service routers, as required or desired. There are pre-built configuration scripts for various platforms that aim to make running the whole application simple. Sock Shop can be used to illustrate microservices architectures, demonstrate platforms at talks and meetups, or as a training and education tool.

Step 12. Verify the existing app, if any

argocd app list                  
ajeetraina@Ajeets-MacBook-Pro ~ % 

Also, you can verify that there are no Sock Shop related microservices are running as shown below:

Step 12. Deploy a Sock Shop app

argocd app create sockshop --repo https://github.com/argoproj/argocd-example-apps.git  --path sock-shop --dest-server https://kubernetes.default.svc --dest-namespace default

application 'sockshop' created

Step 13. Listing out the sample application

argocd app list                  
NAME      CLUSTER                         NAMESPACE  PROJECT  STATUS     HEALTH   SYNCPOLICY  CONDITIONS  REPO                                                 PATH       TARGET
sockshop  https://kubernetes.default.svc  default    default  Running   <none>      <none>      https://github.com/argoproj/argocd-example-apps.git  sock-shop  
ajeetraina@Ajeets-MacBook-Pro ~ % 

Under the Docker Desktop Dashboard UI, you will be able to see the microservice logs. (Please note that Docker Extensions is a new feature that is still in beta phase. You will require the latest Docker Desktop v4.50 release for this to work).

To learn more about the Sock Shop microservice in detail, visit this page.

In my next blog post, I will walkthrough each of these microservices and other sample examples in details.


Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

42 Replies to “Getting Started with Argo CD on Docker Desktop”

  1. A powerful share, I simply given this onto a colleague who was doing just a little analysis on this. And he in reality bought me breakfast as a result of I discovered it for him.. smile. So let me reword that: Thnx for the deal with! However yeah Thnkx for spending the time to discuss this, I feel strongly about it and love studying more on this topic. If doable, as you grow to be experience, would you thoughts updating your weblog with extra particulars? It’s extremely useful for me. Large thumb up for this blog submit!

  2. I carry on listening to the reports lecture about receiving boundless online grant applications so I have been looking around for the top site to get one. Could you tell me please, where could i acquire some?

  3. Thanks , I’ve just been looking for information about this subject for a long time and yours is the best I’ve came upon till now. However, what in regards to the conclusion? Are you sure in regards to the source?

  4. Oh my goodness! an incredible article dude. Thank you Nonetheless I am experiencing subject with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting identical rss downside? Anybody who knows kindly respond. Thnkx

  5. Have you ever considered creating an e-book or guest authoring on other blogs? I have a blog based upon on the same information you discuss and would really like to have you share some stories/information. I know my audience would appreciate your work. If you’re even remotely interested, feel free to shoot me an e-mail.

  6. Definitely believe that which you said. Your favourite justification seemed to be on the net the simplest factor to consider of. I say to you, I certainly get annoyed whilst other people think about worries that they just do not recognize about. You managed to hit the nail upon the highest and also outlined out the entire thing with no need side effect , folks can take a signal. Will probably be back to get more. Thank you

  7. Hi there, just became aware of your blog through Google, and found that it is truly informative. I am going to watch out for brussels. I will be grateful if you continue this in future. Many people will be benefited from your writing. Cheers!

  8. I like the valuable info you provide in your articles. I’ll bookmark your blog and check again here frequently. I am quite sure I will learn lots of new stuff right here! Best of luck for the next!

  9. I’m extremely impressed along with your writing skills as neatly as with the structure on your blog. Is that this a paid theme or did you modify it your self? Either way keep up the excellent high quality writing, it’s rare to peer a nice blog like this one these days..

  10. I’m extremely impressed with your writing skills and also with the layout on your weblog. Is this a paid theme or did you modify it yourself? Anyway keep up the excellent quality writing, it is rare to see a great blog like this one today..

  11. Today, I went to the beach with my kids. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone!

  12. When I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service? Thanks!

  13. You really make it seem so easy with your presentation but I to find this matter to be really something that I feel I might by no means understand. It sort of feels too complicated and extremely extensive for me. I’m having a look ahead in your subsequent submit, I will attempt to get the cling of it!

  14. My brother suggested I might like this website. He was once entirely right. This submit actually made my day. You cann’t believe just how so much time I had spent for this info! Thanks!

  15. This is really interesting, You’re an excessively professional blogger. I’ve joined your rss feed and stay up for searching for extra of your fantastic post. Additionally, I have shared your site in my social networks!

  16. Just desire to say your article is as astonishing. The clearness in your post is simply excellent and i could assume you’re an expert on this subject. Well with your permission let me to grab your feed to keep updated with forthcoming post. Thanks a million and please carry on the gratifying work.

  17. Great ?V I should certainly pronounce, impressed with your website. I had no trouble navigating through all the tabs as well as related information ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your client to communicate. Excellent task..

  18. I just could not depart your site before suggesting that I really enjoyed the standard information a person provide for your visitors? Is going to be back often in order to check up on new posts

  19. I carry on listening to the newscast talk about getting boundless online grant applications so I have been looking around for the most excellent site to get one. Could you tell me please, where could i find some?

  20. Hi there, just became alert to your blog through Google, and found that it’s really informative. I am going to watch out for brussels. I will be grateful if you continue this in future. Many people will be benefited from your writing. Cheers!

Leave a Reply

Your email address will not be published.