Argo CD
Argo Continuous Delivery (Argo CD) is a declarative, Kubernetes-native continuous deployment tool that can read and pull code from Git repositories and deploy it to your cluster. Because of that, you can integrate Argo CD into your GitOps pipeline to automate the deployment and synchronization of your apps.
Before you begin
-
Install the following command line tools:
-
Create or use an existing Kubernetes cluster.
-
Argo CD version 7.8 or later: Review the known issue with Argo CD version 7.8.x.
Set up Argo CD
-
Install Argo CD in your cluster.
kubectl create namespace argocd until kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.12.3/manifests/install.yaml > /dev/null 2>&1; do sleep 2; done # wait for deployment to complete kubectl -n argocd rollout status deploy/argocd-applicationset-controller kubectl -n argocd rollout status deploy/argocd-dex-server kubectl -n argocd rollout status deploy/argocd-notifications-controller kubectl -n argocd rollout status deploy/argocd-redis kubectl -n argocd rollout status deploy/argocd-repo-server kubectl -n argocd rollout status deploy/argocd-server -
Update the default Argo CD password for the admin user to solo.io.
# bcrypt(password)=$2a$10$79yaoOg9dL5MO8pn8hGqtO4xQDejSEVNWAGQR268JHLdrCw6UCYmy # password: solo.io kubectl -n argocd patch secret argocd-secret \ -p '{"stringData": { "admin.password": "$2a$10$79yaoOg9dL5MO8pn8hGqtO4xQDejSEVNWAGQR268JHLdrCw6UCYmy", "admin.passwordMtime": "'$(date +%FT%T%Z)'" }}' -
Port-forward the Argo CD server on port 9999.
kubectl port-forward svc/argocd-server -n argocd 9999:443 -
Open the Argo CD UI.
-
Log in with the
adminusername andsolo.iopassword.
Install Gloo Gateway
-
Create an Argo CD application to install the Gloo Gateway open source Helm chart.
kubectl apply -f- <<EOF apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: gloo-gateway-oss-helm namespace: argocd spec: destination: namespace: gloo-system server: https://kubernetes.default.svc project: default source: chart: gloo helm: skipCrds: false values: | kubeGateway: enabled: false repoURL: https://storage.googleapis.com/solo-public-helm targetRevision: 1.20.0 syncPolicy: automated: # Prune resources during auto-syncing (default is false) prune: true # Sync the app in part when resources are changed only in the target Kubernetes cluster # but not in the git source (default is false). selfHeal: true syncOptions: - CreateNamespace=true EOF -
Verify that the
gloocontrol plane is up and running.kubectl get pods -n gloo-systemExample output:
NAME READY STATUS RESTARTS AGE discovery-76768ff46-db4cb 1/1 Running 0 76s gateway-proxy-7d6b9db55b-6flwm 1/1 Running 0 76s gloo-7b5c894cd7-lp7rr 1/1 Running 0 76s gloo-resource-migration-xxqph 0/1 Completed 0 103s gloo-resource-rollout-check-bj9ft 0/1 Completed 0 62s gloo-resource-rollout-cleanup-j6575 0/1 Completed 0 93s gloo-resource-rollout-vzt7s 0/1 Completed 0 76s -
Verify that the
gloo-gatewayGatewayClass is created. You can optionally take a look at how the gateway class is configured by adding the-o yamloption to your command.kubectl get gatewayclass gloo-gateway -
Open the Argo CD UI and verify that you see the Argo CD application with a
HealthyandSyncedstatus.
Optional: Cleanup
If you no longer need this quick-start Gloo Gateway environment, you can uninstall your setup by following these steps:
-
Port-forward the Argo CD server on port 9999.
kubectl port-forward svc/argocd-server -n argocd 9999:443 -
Open the Argo CD UI.
-
Log in with the
adminusername andsolo.iopassword. -
Find the application that you want to delete and click x.
-
Select Foreground and click Ok.
-
Verify that the pods were removed from the
gloo-systemnamespace.kubectl get pods -n gloo-systemExample output:
No resources found in gloo-system namespace.
-
Port-forward the Argo CD server on port 9999.
kubectl port-forward svc/argocd-server -n argocd 9999:443 -
Log in to the Argo CD UI.
argocd login localhost:9999 --username admin --password solo.io --insecure -
Delete the application.
argocd app delete gloo-gateway-oss-helm --cascade --server localhost:9999 --insecureExample output:
Are you sure you want to delete 'gloo-gateway-oss-helm' and all its resources? [y/n] y application 'gloo-gateway-oss-helm' deleted -
Verify that the pods were removed from the
gloo-systemnamespace.kubectl get pods -n gloo-systemExample output:
No resources found in gloo-system namespace.
Known issues
Settings cannot sync
The Gloo Settings resource stays in a Progressing health status, which prevents updates from syncing. This is due to the Settings resource not returning a status, which became an issue in Argo CD version 7.8.x.
As a workaround, use Argo CD version 7.7.x. or add the following status override to your Argo CD config-cm file.
resource.customizations.health.gloo.solo.io_Settings: |
hs = {}
hs.status = "Healthy"
hs.message = "we are good"
return hs
For more details, see the open gloo and argo-cd GitHub issues.