Kubernetes Logs
Send logs from Kubernetes Cluster using OpenTelemetry
Send Kubernetes container logs to Last9 via OpenTelemetry Collector.
Prerequisites
- A running Kubernetes cluster
- helm installed
- Last9 OTLP credentials from the Integrations page
Installation
curl -O https://raw.githubusercontent.com/last9/last9-k8s-observability/main/last9-otel-setup.shchmod +x last9-otel-setup.sh
./last9-otel-setup.sh logs-only \ endpoint="$last9_otlp_endpoint" \ token="$last9_otlp_auth_header"Verification
kubectl get pods -n last9Visit the Logs Explorer to see data flowing in.
Setting additional log attributes
Customize log attributes in last9-otel-collector-values.yaml:
transform/logs/last9: error_mode: ignore log_statements: - context: resource statements: - set(attributes["service.name"], attributes["k8s.container.name"]) where attributes["service.name"] == "" - set(attributes["deployment_environment"], "staging")Uninstall
./last9-otel-setup.sh uninstallTroubleshooting
Please get in touch with us on Discord or Email if you have any questions.