Shipping Kubernetes events

Kubernetes events are a resource type that Kubernetes automatically creates when other resources get state changes, errors, or other messages that should be shared across the system.

This guide uses the kubernetes-event-exporter tool to ship kubernetes events to Logz.io.

Create monitoring namespace
kubectl create namespace monitoring
Store your Logz.io credentials

Save your Logz.io shipping credentials as a Kubernetes secret. To do this, customize the sample command below to your specifics and run it.

kubectl create secret generic logzio-events-secret \
  --from-literal=logzio-log-shipping-token='<<LOG-SHIPPING-TOKEN>>' \
  --from-literal=logzio-log-listener='<<LISTENER-HOST>>' \
  -n monitoring
  • Replace <<LISTENER-HOST>> with the host for your region. For example, listener.logz.io if your account is hosted on AWS US East, or listener-nl.logz.io if hosted on Azure West Europe.
  • Replace <<LOG-SHIPPING-TOKEN>> with the token of the account you want to ship to.
Deploy
kubectl apply -f https://raw.githubusercontent.com/logzio/logz-docs/master/shipping-config-samples/k8s-events.yaml
Check Logz.io for your events

Give your events some time to get from your system to ours, and then open Kibana.

If you still don’t see your events, see log shipping troubleshooting.