- Hands-On Microservices with Kubernetes
- Gigi Sayfan
- 433字
- 2021-06-24 13:46:51
Exploring Argo CD
Now that we have logged in and configured Argo CD, let's explore it a little bit. I really like the UI, but you can do everything from the command line or through a REST API, too, if you want to access it programmatically.
I already configured Argo CD with the three Delinkcious microservices. Each service is considered an application in Argo CD speak. Let's take a look at the Applications view:
There are a few interesting things here. Let's talk about each one:
- The project is an Argo CD concept for grouping applications.
- The namespace is the Kubernetes namespace where the application should be installed.
- The cluster is the Kubernetes cluster, that is, https://kubernetes.default.svc and this is the cluster where Argo CD is installed.
- The status tells you if the current application is in sync with its YAML manifests in the Git repository.
- The health tells you if the application is OK.
- The repository is the application's Git repository.
- The path is the relative path within the repository where the k8s YAML manifests live (Argo CD monitors this directory for changes).
Here is what you get from the argocd CLI:
$ argocd app list
NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS
link-manager https://kubernetes.default.svc default default OutOfSync Healthy Auto-Prune <none>
social-graph-manager https://kubernetes.default.svc default default Synced Healthy Auto-Prune <none>
user-manager https://kubernetes.default.svc default default Synced Healthy Auto-Prune <none>
As you can see (both in the UI and in the CLI), link-manager is out of sync. We can sync it by selecting Sync from the ACTIONS dropdown:
Alternatively, you can do this from the CLI:
$ argocd app sync link-manager
One of the coolest things about the UI is how it presents all the k8s resources associated with an application. By clicking on the social-graph-manager application, we get the following view:
We can see the application itself, the services, the deployments, and the pods, including how many pods are running. This is actually a filtered view and, if we want to, we can add the replica sets associated with each deployment and the endpoints of each service to the display. However, these aren't interesting most of the time, so Argo CD doesn't display them by default.
We can click on a service and view a SUMMARY of its information, including the MANIFEST:
For pods, we can even check the logs, as shown in the following screenshot, all from the comfort of the Argo CD UI:
Argo CD can already take you a long way. However, it has a lot more to offer, and we will dive into these offerings later on in this book.