Prerequisites
- Have access to a Kubernetes cluster.
- 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:
Running multiple reporters
If you are considering running more than one reporter against the same cluster, the table below summarizes which setups produce meaningful snapshots and which don’t.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