Demonstrate GitOps on Managed OpenShift with ArgoCD
This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.
Author: Steve Mirman
Video Walkthrough
If you prefer a more visual medium, you can watch Steve Mirman walk through this quickstart on YouTube .
The purpose of this document is to help you get OpenShift GitOps running in your cluster, including deploying a sample application and demonstrating how ArgoCD ensures environment consistency.
This demo assumes you have a Managed OpenShift Cluster available and cluster-admin rights.
GitHub resources referenced in the demo:
- BGD Application:
gitops-bgd-app
- OpenShift / ArgoCD configuration: gitops-demo
Required command line (CLI) tools
Environment Set Up
Install the OpenShift GitOps operator
-
Install the OpenShift GitOps operator from the Operator Hub

Pull files from GitHub
-
Clone the
gitops-demoGitHub repository to your local machine -
Export your local path to the GitHub files
Log in to OpenShift via the CLI
-
Retrieve the login command from the OpenShift console

-
Enter the command in your terminal to authenticate with the OpenShift CLI (oc)
Output should appear similar to:
Deploy the ArgoCD Project
Create a new OpenShift project
- Create a new OpenShift project called gitops
Edit service account permissions
- Add cluster-admin rights to the
openshift-gitops-argocd-application-controllerservice account in the openshift-gitops namespace
Log in to ArgoCD
-
Retrieve ArgoCD URL:
-
Retrieve ArgoCD Password:
-
In a browser, navigate to the ArgoCD console using the
$argoURLvalue returned above

-
Log in with the user name admin and the password returned as
$argoPassabove

Optional step if you prefer CLI access Login to the CLI:
Deploy the ArgoCD project
-
Use
kubectlto apply thebgd-app.yamlfileThe bgd-app.yaml file defines several things, including the repo location for the
gitops-bgd-appapplication

-
Check the rollout running the following command:
-
Once the rollout is complete get the route to the application
-
In your browser, paste the route to open the application

-
Go back to your ArgoCD window and verify the configuration shows there as well

-
Exploring the application in ArgoCD, you can see all the components are green (synchronized)

Deploy a change to the application
-
In the terminal, enter the following command which will introduce a chance into the bgd application
-
Go back to your ArgoCD window. The application should no longer be synchronized

-
Refresh the bgd application window and notice the change in box color

The new deployment changed the box from blue to green, but only within OpenShift, not in the source code repository
Synchronize the application
-
In the ArgoCD console, click the
SYNCbutton to re-synchronize the bgd application with the approved configuration in the source code repository

-
Refresh the bgd application window and notice the change in box color
