In the previous exercises, we create helm charts that can be used to create resources on kubernetes clusters.
To level up the experience, we’re going to use ArgoCD to deliver that code to our cluster, and have it reconcile resources for us.
Essentially, helm charts define what we want to deploy, and ArgoCD is how we deploy it. The two working together create a powerful flow for managing resources on clusters.
Refer back to your student page to retrieve the link to access your team’s instance of ArgoCD, which will be used to deploy things into your namespace.
Once logged in, you may be greeted with an empty window, or there may be other application tiles.
Click on the + New App
button to start adding a new application to be deployed.
In the window pane that appears on the right, we’ll need to enter some information about our application, and where to find the code for it.
Start by giving the application a name, such as network-automation
, and setting the project name to default
- this is just the namespace where the project definition will live, not where our resources will be deployed.
Scrolling down, add information about the code repository. The URL can be retrieved from the Gitea interface if needed:
Enter this information into the appropriate place under the Source
header:
Under destination, ensure the cluster URL is set to the local cluster: https://kubernetes.devault.svc
, and that the Namespace is set to your team’s namespace. In this example, team1’s namespace is used.
Once finished, hit the Create
button at the top of the window.
The above process can also be done as code, if you like, using the following format:
# Note: Team 1 is used as an example here - replace with your team information
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: network-automation
spec:
destination:
name: ''
namespace: team1
server: https://kubernetes.default.svc
source:
path: network-automation
repoURL: >-
https://gitea-student-services.apps.acp.rh1.redhat-workshops.com/rh1/team1-code.git
targetRevision: HEAD
sources: []
project: default
This should appear as so in the web interface:
Once finished, click the Create
button.
After hitting the create button, a new application tile should appear, with details about the new application:
Clicking on the application tile will show more information, such as the resources that are to be deployed and managed:
As discussed previously, our helm templates have been rendered, showing our configmap. Our job won’t appear until we hit the Sync
button in the next step.
With the application sitting in an OutOfSync state, the resources are set to be deployed:
To begin syncing the application, click on the Sync
button. A menu will appear on the right with options:
For our purposes, no additional options are needed. Simply click the Synchronize
button at the top.
The ArgoCD interface will show the sync process, the resources being created, and the current state of the sync.
After a few moments, the application will show Synced:
And within the OpenShift Console, a new job will appear:
Navigation
Previous Exercise | Next Exercise |