Argo CD is an open-source continuous delivery tool based on GitOps methodology. Argo automates the deployment of applications by monitoring your cluster and the infrastructure defined declaratively in a Git repository, and then reconciling any disparities.
Using Port's Kubernetes Exporter, you can keep track of all ArgoCD resources across your different clusters and export all of the data to Port. You will use built in metadata from your kubernetes resources and CRDs to create Entities in Port and keep track of their state.
Get to know the basics of our Kubernetes exporter here!
- Helm must be installed to use the chart. Please refer to Helm's documentation to get started;
jqcommand must installed;
yqcommand must installed;
kubectlcommand must be installed;
- Have your Port credentials ready.
In this use-case, you will use a custom bash script which will assist you in the process of installing Port's K8s exporter.
For more information about the k8s exporter installation script click here!
The script will install the helm chart to the Kubernetes cluster which is currently in kubectl context. To view the context name of the cluster the exporter will be installed on, run:
kubectl config current-context
Setting up your Blueprints
Creating Blueprints using the installation script
The installation script provides a convenient way to create your blueprints. Using the
CUSTOM_BP_PATH environment variable, you can fetch a pre-defined
blueprints.json to create your blueprints.
- If you use Argo Rollouts, use this file to define your blueprints. Do this by running:
- If you don't use Argo Rollouts, use this file by running:
blueprints.json file defines the following blueprints:
- Workload *;
- ArgoCD Application;
- ArgoCD Project;
- ArgoCD Repository.
Workloadis an abstraction of Kubernetes objects which create and manage pods. By creating this blueprint, you can avoid creating a dedicated blueprint per Workload type, all of which will likely look pretty similar. Here is the list of kubernetes objects
- Argo Rollouts (Only for Rollouts
Exporting your Kubernetes cluster
Installing the Kubernetes exporter using the script
CONFIG_YAML_URL parameter, you can define a custom
config.yaml to use when installing the exporter.
- If you use Argo rollouts, use this configuration file. To achieve this, run:
- If you don't use Argo Rollouts, use this configuration file by running:
You can now run the installation script using the following code snippet:
curl -s https://raw.githubusercontent.com/port-labs/template-assets/main/kubernetes/install.sh | bash
You can now browse to your Port environment to see that your blueprints have been created, and your k8s and ArgoCD resources are being reported to Port using the freshly installed k8s exporter.