Skip to Content
FlowShapeDocs
AgentSources

Kubernetes

Workloads, services, ingresses, config and storage from every namespace, with kubectl.

node flowshape-agent.mjs --key <key> --kubernetes
node flowshape-agent.mjs --key <key> --kubernetes --context prod-eu

The agent uses kubectl on its machine, with the context kubectl uses now (or --context). It runs:

kubectl get deploy,sts,ds,svc,ing,cm,pvc,cronjob,job,pod -A -o json
kubectl get secrets -A -o json

Access

The built-in view ClusterRole is enough for everything but Secrets. Check it with:

kubectl get pods -A

Secrets

Secrets show which workloads use which Secret. Reading them needs list on secrets cluster-wide, which the view role doesn't give.

  • Without it, the agent skips Secrets and the diagram shows the workloads only.
  • With it, each Secret keeps its name, type, labels and annotations; its values, and the last-applied-configuration annotation that repeats them, are dropped as soon as kubectl returns them, before anything leaves the agent.

Anything that isn't a Secret is passed on as kubectl prints it: ConfigMaps, and environment variables written straight into a pod spec. Keep secrets in Secrets.

On this page