Logging with Kubernetes and Logtail

  1. Follow the Vector guideline  and set up the Kubernetes integration.

  2. Append a configMapGenerator to your Vector kustomization.yaml file

configMapGenerator:
  - name: vector
    behavior: replace
    files:
      - vector-agent.toml
Copied!
  1. Add the following Logtail sink configuration into your vector-agent.toml file
[sinks.logtail]
type = "http"
inputs = ["kubernetes_logs"]
uri = "https://in.logtail.com/"
encoding.codec = "json"
auth.strategy = "bearer"
auth.token = "YOUR_LOGTAIL_SOURCE_TOKEN"
Copied!
  1. Reload Vector configuration and restart it:
kubectl apply -k .
kubectl rollout restart -n vector daemonset/vector
Copied!
  1. That's all 🎉