Cluster Addons Installation
Yorkie provides a set of cluster addons to help you monitor and manage Yorkie cluster.
This guide will walk you through the process of installing Yorkie cluster addons on your Kubernetes cluster.
Currently, Yorkie addons include:
- Prometheus for collecting metrics from Yorkie cluster.
- Grafana for monitoring Yorkie cluster via Grafana dashboard.
- Loki for logging aggregation.
- ArgoCD for managing Yorkie cluster via GitOps.
Prerequisites
This guide assumes that you have installed Yorkie cluster on your Kubernetes cluster with Helm chart. If you haven't installed Yorkie cluster, follow guides for deploying Yorkie cluster on Kubernetes with Helm Charts on various platforms.
- Minikube Installation: Guide to install Yorkie cluster on Minikube.
- AWS EKS Installation: Guide to install Yorkie cluster on AWS EKS.
Install Yorkie Monitoring with Helm chart
You can install Yorkie monitoring addon to collect and monitor Yorkie metrics and logs. Yorkie monitoring addons include Prometheus, Grafana, and Loki to collect metrics and logs from Yorkie cluster.
Install Yorkie monitoring addon with the following command:
$ helm install yorkie-monitoring yorkie-team/yorkie-monitoring -n monitoring --create-namespace
If you are using AWS EKS, use the following command instead:
$ helm install yorkie-monitoring yorkie-team/yorkie-monitoring -n monitoring --create-namespace \--set ingress.ingressClassName=alb \--set ingress.hosts.enabled=true \--set ingress.hosts.apiHost={YOUR_API_DOMAIN_NAME} \--set ingress.hosts.alb.enabled=true \--set ingress.alb.certArn={YOUR_CERTIFICATE_ARN}
Replace {YOUR_API_DOMAIN_NAME}
with your domain name.
Also, replace {YOUR_CERTIFICATE_ARN}
with your certificate ARN.
This will install yorkie-monitoring
release.
After Yorkie monitoring is installed, you will see the following output:
NAME: yorkie-monitoringLAST DEPLOYED: Tue May 2 15:13:00 2023NAMESPACE: monitoringSTATUS: deployedREVISION: 1NOTES:--- Install Complete ---yorkie-monitoring successfully installed!For next steps, follow:$ curl https://github.com/yorkie-team/yorkie/tree/main/charts/yorkie-monitoringTo learn more about the release, try:$ helm status yorkie-monitoring -n monitoring$ helm get all yorkie-monitoring -n monitoring
Now you have Yorkie monitoring installed. It will take a few minutes for pods to be ready, so wait until all pods are ready. You can check the status of pods with the following command:
$ kubectl get pods -n monitoring --watch
After all pods are ready, you will see the following output:
NAME READY STATUS RESTARTS AGEprometheus-yorkie-monitoring-prometheus-0 2/2 Running 0 14myorkie-monitoring-grafana-59d4565948-pfstz 3/3 Running 0 14myorkie-monitoring-loki-0 1/1 Running 0 14myorkie-monitoring-operator-78f75648c-rvjk9 1/1 Running 0 14myorkie-monitoring-prometheus-node-exporter-gr4bn 1/1 Running 0 14myorkie-monitoring-promtail-bwc9g 1/1 Running 0 14m
View Yorkie Metrics and Loki Logs on Grafana dashboard
Now you have Yorkie monitoring installed, you can access Grafana dashboard to view Yorkie metrics and Loki logs.
Access Grafana dashboard with following url:
- Minikube: http://
YOUR_MINIKUBE_IP
/grafana/ - AWS EKS: http://
YOUR_API_DOMAIN_NAME
/grafana/
admin
and yorkie
.Once you are logged in, you will see the following dashboard:
namespace
and workload
to yorkie
to see Yorkie logs in Loki dashboard.You can add more dashboards like Go Processes in Grafana dashboard.
Install Yorkie ArgoCD with Helm chart
You can install Yorkie ArgoCD addon to perform continuous delivery of Yorkie cluster with GitOps. Yorkie ArgoCD addon includes ArgoCD to perform continuous delivery of Yorkie cluster.
Install Yorkie ArgoCD addon with the following command:
$ helm install yorkie-argocd yorkie-team/yorkie-argocd -n argocd --create-namespace
If you are using AWS EKS, use the following command instead:
$ helm install yorkie-argocd yorkie-team/yorkie-argocd -n argocd --create-namespace \--set ingress.hosts..ingressClassName=alb \--set ingress.hosts.enabled=true \--set ingres.hosts.apiHost={YOUR_API_DOMAIN_NAME} \--set ingress.alb.enabled=true \--set ingress.alb.certArn={YOUR_CERTIFICATE_ARN}
Replace {YOUR_API_DOMAIN_NAME}
with your domain name.
Also, replace {YOUR_CERTIFICATE_ARN}
with your certificate ARN.
This will install yorkie-argocd
release.
After Yorkie ArgoCD is installed, you will see the following output:
NAME: yorkie-argocdLAST DEPLOYED: Tue May 2 16:06:03 2023NAMESPACE: argocdSTATUS: deployedREVISION: 1TEST SUITE: NoneNOTES:--- Install Complete ---yorkie-argocd successfully installed!For next steps, follow:$ curl https://github.com/yorkie-team/yorkie/tree/main/charts/yorkie-argocdTo learn more about the release, try:$ helm status yorkie-argocd -n argocd$ helm get all yorkie-argocd -n argocd
Then, you need to set up the admin password for ArgoCD.
# Set the initial password for the admin user$ kubectl -n argocd patch secret argocd-secret \-p '{"stringData": {"admin.password": "$2a$12$fJoZj9CnNyD5Yfi02nZh7.XcH4Ds9M.oftQOQDP5oytyra9cP6Dny","admin.passwordMtime": "'$(date +%FT%T%Z)'"}}'# Restart the ArgoCD server to apply the new password$ kubectl -n argocd get pod --no-headers=true | awk '/argocd-server/{print $1}'| xargs kubectl delete -n argocd pod
Now you have Yorkie ArgoCD installed.
It will take a few minutes for pods to be ready, so wait until all pods are ready. You can check the status of pods with the following command:
$ kubectl get pods -n argocd --watch
After all pods are ready, you will see the following output:
NAME READY STATUS RESTARTS AGEargocd-application-controller-0 1/1 Running 0 2m53sargocd-applicationset-controller-75cb58f45c-vxzv8 1/1 Running 0 2m53sargocd-dex-server-67df64dd59-9shpk 1/1 Running 0 2m53sargocd-notifications-controller-65fbf675f4-rjpvw 1/1 Running 0 2m53sargocd-redis-75b645466f-r2jgn 1/1 Running 0 2m53sargocd-repo-server-57df48bf86-h4pwd 1/1 Running 0 2m53sargocd-server-6bd555f4c6-7sh8l 1/1 Running 0 57s
View Yorkie GitOps on ArgoCD web UI
Now you have Yorkie ArgoCD installed, you can access ArgoCD web UI to view deployment status of Yorkie cluster.
Access ArgoCD web UI with following url:
- Minikube: http://
YOUR_MINIKUBE_IP
/argocd/ - AWS EKS: http://
YOUR_API_DOMAIN_NAME
/argocd/
admin
and yorkie
.Once you are logged in, you will see the following dashboard:
Clean up cluster addons
You have now installed Yorkie monitoring and ArgoCD, and viewed Yorkie metrics on Grafana dashboard and Yorkie GitOps on ArgoCD web UI.
To learn about how to configure Yorkie Monitoring and Yorkie ArgoCD in Helm Chart, see Yorkie Chart Repository.
First, uninstall Yorkie ArgoCD with the following command:
# Uninstall Yorkie ArgoCD helm chart release$ helm uninstall yorkie-argocd -n argocd# Delete ArgoCD CRDs$ kubectl get crd -oname | grep --color=never 'argoproj.io' | xargs kubectl delete# (Optional) Delete ArgoCD namespace$ kubectl delete namespace argocd
Then, uninstall Yorkie monitoring with the following command:
# Uninstall Yorkie monitoring helm chart release$ helm uninstall yorkie-monitoring -n monitoring# Delete monitoring CRDs$ kubectl get crd -oname | grep --color=never 'monitoring.coreos.com' | xargs kubectl delete# Delete monitoring service accounts$ kubectl delete serviceaccounts --all -n monitoring# (Optional) Delete monitoring namespace$ kubectl delete namespace monitoring
Next Steps
For more information about Yorkie cluster design, follow: Yorkie Cluster Design