Syn can watch one or more Kubernetes clusters. It uses two separate, read-only paths:
| Path | What it reads | Needs | Feeds |
|---|---|---|---|
| Security Onion / Elasticsearch | container logs, Kubernetes warning events, API server request metrics, pod / container / node metrics, IDS and detection alerts on node and pod IPs | the Elastic Agent Kubernetes integration in each cluster, shipping to the same Elasticsearch | Devices → Kubernetes (signals, events, API server, pods), the watcher (every event window, default 5 min), Open events |
| Kubernetes API (one read-only account per cluster) | cluster configuration: namespaces, workloads, pods, services, ingresses, network policies, RBAC, control-plane flags, running image digests | a ServiceAccount token with get/list/watch only | CIS benchmark, Kubernetes map, container image updates and CVEs |
The two paths are independent. A cluster without the Elastic Agent still gets the CIS benchmark, the map and the image checks. A cluster without an API account still gets the log, event and alert monitoring.
Syn never changes a cluster. It does not read secrets, ConfigMaps or pod logs through the API (logs come only from Elasticsearch), and it cannot exec into pods.
Add the Elastic Agent Kubernetes integration to the cluster’s Fleet policy with these inputs:
kubernetes.container_logs): the main security source.kubernetes.event).kubernetes.apiserver).kubernetes.pod, kubernetes.container, kubernetes.node).kube-state-metrics is optional. When it is missing, the Security Onion data coverage box lists the state_* data
sets as errors, and the nightly run reports them once.
Elasticsearch documents from Kubernetes carry no cluster name, so Syn attributes each document to the cluster that owns the node that sent it. For that matching to work, the cluster also needs an API account (next section).
docs/kubernetes-readonly.yaml in the cluster. It creates:
netmon-readonly namespace with pod security set to restricted;The role does not include secrets, configmaps, pods/log, pods/exec, pods/attach,
pods/portforward, nodes/proxy (the kubelet API, which can be abused to run commands) or
serviceaccounts/token.
kubectl -n netmon-readonly get secret netmon-readonly-token -o jsonpath='{.data.token}' | base64 -d
kubectl config view --raw --minify -o jsonpath='{.clusters[0].cluster.certificate-authority-data}' | base64 -d
The token is write-only: it is stored on the server and never shown again. The API server certificate is always verified. Each configured cluster has its own card, and Remove cluster deletes the cluster and its token.
k8s.py)Namespaces whose logs legitimately contain such text (a threat-intel platform, a scanner) can be exempted per
pattern kind in host_policy → k8s.signal_exempt.
Pod pivot. Click a pod anywhere to open its page. It shows the pod notes, links to Kibana, the log volume (stderr marked) and the newest container logs with text, container and stream filters, plus its security hits, warning events and alerts. A workload name (from a pod note or the Risk page) shows all its pods.
kube_cis.py), every 6 hours and on Run now. It covers:
File permissions (1.1), etcd (2) and the kubelet (4) need node access and are listed as manual, never as passed.
Pods in namespaces labelled pod-security.kubernetes.io/enforce=privileged are listed but do not fail the
pod-security checks. You can accept a failed check with a reason in host_policy → k8s.cis_accept.
kube_map.py): namespaces with their ingresses → services → pods → containers, and each
container’s security context. Details on click.kube_images.py), daily at 04:00 UTC and on Scan now. For each running image digest:
aquasec/trivy in Docker, images
read straight from the registry);Results are cached per digest for 24 hours. The Trivy database is kept in ~/netmon-trivy-cache (about 3 GB).
Every workload (Deployment, StatefulSet, DaemonSet, Job, bare pod) is scored with the same model as hosts and ranked in the same list. Show switches between hosts and containers, hosts only, and containers only.
kube-*, CNI, storage,
cert-manager…);Override it per namespace or per namespace/workload in host_policy → k8s.impact, for example
{"apps/billing": [5, "payment data"]}.
Container vulnerabilities ranked by risk lists each weakness per workload, with how to fix it. Workloads with an ingress or an external service weigh 1.4×. Workload names link to the pod pivot page.
Pods are temporary: they get a new name on every restart, rollout or reschedule. So a pod note is not stored on a pod. It is
stored on the object that creates the pods - its Deployment, StatefulSet, DaemonSet, CronJob or Job - and applies to every
pod that object makes, today’s and the ones it creates later. The subject is pod:<cluster>/<namespace>/<kind>/<name>, for
example pod:talos/opencti/deployment/opencti-worker. A pod nothing creates (a static pod such as kube-apiserver-<node>) keeps
its notes under kind pod and its own name. The owner comes from the Security Onion pod fields (a ReplicaSet maps to its
Deployment, a CronJob’s Job to its CronJob). Notes written with the older subject pod:<cluster>/<namespace>/<workload> are still read.
In the dashboard:
Notes page: pod notes show the owner kind and “all its pods”.
pod note lines for every event about that workload (container-log hits and
Kubernetes events);pod_notes.subject: pod.subject);AI notes are marked ✨, can be accepted or rejected by a defender, and can be deleted.
Every result above becomes a host finding with a key starting k8s-. So the correlation, the review job, auto-close,
Posture and Open events handle them like any other endpoint finding.
| Key | Priority | Raised by |
|---|---|---|
k8s-log\|cmd/miner/webattack\|… |
Investigate | watcher + nightly |
k8s-log\|secret\|…, k8s-api\|exec, k8s-api\|denied, k8s-cov\|…, k8s-img\|… |
Review | watcher + nightly |
k8s-ev\|… forbidden / PodSecurity events |
Review | watcher + nightly |
k8s-ev\|… other warning events, k8s-log\|… auth / denied / TLS / crash hits |
Info (low in Open events) | nightly snapshot only |
k8s-alert\|<rule> high Security Onion alert on a node or pod |
Investigate | nightly |
Failed CIS checks and container images with critical/high CVEs fixed by an available update are things to fix, not
events. They go to Security → Fix list (k8s-cis|<cluster>|<id>, k8s-imgcve|<repo>, with how to fix them), not to
endpoint findings or Open events. Accepted checks (k8s.cis_accept) are
left out, and a check that passes again moves to Fixed.
Every Kubernetes page has a Cluster selector at the top: All clusters or one cluster. The choice is kept in the browser.
| Module | Runs in | Access |
|---|---|---|
k8s.py |
host (broker, watcher, collector) | Elasticsearch read-only |
kube_api.py |
host | Kubernetes API: GET + SelfSubjectAccessReview, TLS verified, fails over between API server URLs |
kube_cis.py, kube_map.py |
host (broker, collector) | through kube_api.py |
kube_images.py |
host (scheduler job k8simages, broker Scan now) |
kube_api.py, registries (anonymous HTTPS), Docker for Trivy |
static/k8s.js, static/k8smap.js |
dashboard | /api/k8s* → host broker /k8s |
The dashboard holds neither the Elasticsearch key nor any Kubernetes token. Everything goes through the loopback host
broker (/k8s, actions overview, pod, clusters, map, cis, cis_run, images, image, images_run).