Docs
Plugins
Sources
Kubernetes
Configuration

K8s Source Plugin Configuration Reference

The K8s source plugin connects to a Kubernetes cluster, fetches resources and loads it into any supported CloudQuery destination (e.g. PostgreSQL, BigQuery, Snowflake, and more).

Example

This example connects a single k8s context to a Postgres destination. The (top level) source spec section is described in the Source Spec Reference.

kind: source
spec:
  # Source spec section
  name: k8s
  path: cloudquery/k8s
  version: "v4.0.0"
  tables: ["*"]
  destinations: ["postgresql"]

  spec:
    contexts: ["context"]

K8s Spec

This is the (nested) spec used by K8s Source Plugin

  • contexts ([]string) (default: empty. Will use the default context from K8s's config file)

    Specify specific K8s contexts to connect to. Specifying * will connect to all contexts available in the K8s config file (usually ~/.kube/config).