Platform Process Logging
vCluster Platform writes operational logs to stdout from the platform pod. These logs cover initialization, controller reconciliation, API request handling, and runtime errors. Check these logs first when diagnosing unexpected platform behavior.
By default, logs use a human-readable console format at info level.
Log levels​
Platform logging supports three log levels:
infodebugerror
For a description of each level, see Platform process logs.
Debug logging significantly increases log volume. Enable it only while reproducing an issue, then return to info.
To change the log level, upgrade the Helm release with the logging.level value:
helm upgrade vcluster-platform vcluster-platform \
--repo https://charts.loft.sh \
--namespace vcluster-platform \
--reuse-values \
--set logging.level=debug
Log format​
vCluster Platform supports two output formats.
- Console
- JSON
The default console format produces human-readable output suited to manual log review:
2023-07-11 09:20:56 INFO controller-runtime.metrics metrics/listener.go:44 Metrics server is starting to listen {"component": "loft", "addr": "127.0.0.1:12000"}
2023-07-11 09:20:56 INFO initialize/context.go:68 Initialize... {"component": "loft"}
2023-07-11 09:20:56 INFO initialize/context.go:72 Ensure certificates... {"component": "loft"}
The JSON format produces structured output suited to log aggregation systems such as Elasticsearch, Splunk, or Grafana Loki:
{"level":"info","ts":1689067388.209614,"logger":"controller-runtime.metrics","caller":"metrics/listener.go:44","msg":"Metrics server is starting to listen","component":"loft","addr":"127.0.0.1:12000"}
{"level":"info","ts":1689067388.2099726,"caller":"initialize/context.go:68","msg":"Initialize...","component":"loft"}
{"level":"info","ts":1689067388.2100549,"caller":"initialize/context.go:72","msg":"Ensure certificates...","component":"loft"}
Each entry contains at minimum:
| Field | Type | Description |
|---|---|---|
level | string | Log level (info, warn, error, debug) |
ts | number | Unix timestamp (seconds since epoch) |
caller | string | Source file and line number |
msg | string | Log message |
component | string | Platform component that emitted the log |
Additional fields vary by subsystem and operation type. For example, controller events may include namespace and name while API handler logs may include method and status.
To switch to JSON format:
helm upgrade vcluster-platform vcluster-platform \
--repo https://charts.loft.sh \
--namespace vcluster-platform \
--reuse-values \
--set logging.encoding=json
View logs​
kubectl logs -n vcluster-platform -l app=loft -f
In high-availability deployments, multiple platform pods run concurrently. Pipe through a log aggregator, or target a specific pod, to avoid interleaved output from multiple replicas.