Prerequisites
- Have access to a Kubernetes cluster.
- Create a Kosli account if you do not have one.
- Create a Kubernetes Kosli environment named
k8s-tutorial. - Get a Kosli API token.
Report a snapshot
- Helm chart (recommended)
- Externally scheduled cron
- Kosli CLI (testing only)
The Kosli K8S reporter Helm chart deploys a inside your cluster that automatically reports running artifacts to Kosli on a schedule. This is the recommended approach for production use.Install Helm if you have not done so.The CronJob will now run every 5 minutes and report what is running in the cluster to Kosli.
- Create a Kubernetes secret containing your Kosli API token:
- Create a
tutorial-values.yamlfile to configure the chart:
- Install the chart:
- Confirm the CronJob was created:
What you’ve accomplished
You have reported a snapshot of your Kubernetes cluster to Kosli. Kosli now tracks the running artifacts in that environment and will record changes as they happen. From here you can:- Query your environment with
kosli list snapshotsandkosli get snapshot - Compare snapshots to see what changed
- Trace a running artifact back to its git commit with the From commit to production tutorial