Skip to main content

Kubernetes File

The KubernetesFile config type is used to scrape the contents of files inside Kubernetes Pods.

k8s-file-scraper.yaml
apiVersion: configs.flanksource.com/v1
kind: ScrapeConfig
metadata:
name: k8s-file-scraper
spec:
kubernetesFile:
- selector:
namespace: demo
kind: Statefulset
name: postgresql
files:
- path:
- /var/lib/postgresql/data/pgdata/postgresql.conf
format: properties

Scraper

FieldDescriptionSchemeRequired
logLevelSpecify the level of logging.string
scheduleSpecify the interval to scrape in cron format. Defaults to every 60 minutes.string
fullSet to true to extract changes from scraped configurations. Defaults to false.bool
retentionSettings for retaining changes, analysis and scraped itemsRetention
kubernetesFileSpecifies the list of Kubernetes File configurations to scrape.[]KubernetesFile

KubernetesFile

FieldDescriptionScheme
files*

List of files inside the pod to scrape

[]File

selector*

Pods to extract files from

ResourceSelector

cnrm

CNRM connection details

CNRM

connection

The connection url to use, mutually exclusive with kubeconfig

Connection

container

Name of container

eks

EKS connection details

EKS

gke

GKE connection details

GKE

kubeconfig

Source for kubeconfig

EnvVar

labels

Labels for each config item.

map[string]string

properties

Custom templatable properties for the scraped config items.

[]ConfigProperty

tags

Tags for each config item. Max allowed: 5

[]ConfigTag

transform

Transform configs after they've been scraped

Transform

File

FieldDescriptionSchemeRequired
pathSet path to file contained in Pod[]string
formatSpecify format of filestring