// Deployment-Referenz
Monitoring the hub's own cluster (bundled core-agent)
Fleeger can watch the very Kubernetes cluster it runs in, without a separate agent, using the bundled core-agent. Two things make that work:
- A ServiceAccount with read-only RBAC (
core-agent-rbac.yaml). Ak8s_clusterresource left without a kubeconfig credential falls back to in-cluster access via this ServiceAccount's token. The ClusterRole grantsget/listover exactly what the collector reads (nodes, pods, namespaces, services, PVCs, workloads, jobs, ingresses, HPAs, metrics, cert-manager CRDs) — nothing writable. - The core-agent Deployment (
core-agent.yaml), which runs the spoke-agent image in core mode and authenticates with the hub-levelcore-agent.creds.
Apply
# core-agent.creds must be in the fleeger-nats-auth Secret (the create command in
# "Secrets the hub needs" includes it). Then:
kubectl -n fleeger apply -f core-agent-rbac.yaml
kubectl -n fleeger apply -f core-agent.yamlRunning the hub in a namespace other than fleeger? Edit the
ClusterRoleBinding subject namespace: in core-agent-rbac.yaml to match.
Then, in the UI
Create a location flagged local collector and add a k8s_cluster resource
with its credential left empty — that's the switch that makes the collector
use the in-cluster ServiceAccount instead of a kubeconfig. Do not paste the
external admin kubeconfig: its endpoint is a control-plane public IP a firewalled
pod can't reach, and it's far more privileged than the collector needs.
Monitoring a DIFFERENT cluster from inside it
To monitor a cluster that is not the hub's (a remote spoke), run a fleeger-agent in that cluster instead, with its own ServiceAccount + the same read-only ClusterRole. See Running a spoke-agent with plain manifests.