Skip to content

Your first job

Create a job.yaml file:

apiVersion: v1
kind: CollectJob
metadata:
name: test
spec:
collectors:
- id: kind
terraform:
provider: hashicorp/kubernetes
args:
config_path: ~/.kube/config
config_context: kind-kind
steps:
- id: deployments
collector: kind
terraform_datasource:
name: kubernetes_resources
args:
api_version: apps/v1
kind: Deployment
namespace: kube-system

And run the job:

Terminal window
infracollect collect job.yaml