Skip to content

Creating a Kubernetes source

Learn how to create a Kubernetes source to query logs from pods and containers via the Kubernetes API.

You need an existing Kubernetes connection with connection_use permission. See Creating a Kubernetes connection for connection setup instructions.

Navigate to Sources+Create.

Choose an existing Kubernetes connection from the dropdown and configure namespace filtering:

Namespace filtering (optional):

Configure which namespaces are available:

  • Namespace label selector – Filter namespaces by labels using Kubernetes label selector syntax (e.g., env=production)
  • Namespace field selector – Filter namespaces by fields using Kubernetes field selector syntax (e.g., metadata.name=default)
  • Namespace FlyQL filter – Use FlyQL expressions for complex namespace filtering

Review the predefined column list:

  • Kubernetes sources have a fixed, predefined list of available columns
  • The column list cannot be modified (no adding or removing columns)

Available columns:

ColumnTypeDescription
timedatetimeTimestamp of the log entry
severitystringExtracted severity level (configured via severity rules)
contextstringKubernetes context name
namespacestringKubernetes namespace
podstringName of the pod
containerstringName of the container
nodestringName of the node hosting the pod
labelsjsonPod labels as JSON object
annotationsjsonPod annotations as JSON object
bodyjsonLog message content (normalized from container output)
statusstringPod status (Running, Pending, etc.)

Configure source settings:

  • Default chosen columns – Select which columns are displayed by default in the explorer (time column is always included)
  • Severity rules – Configure rules to extract and normalize severity from log messages
  • Execute query on open – Controls whether queries run automatically when opening the explorer, or if the user must press “Execute” button explicitly

Specify source identification:

  • Slug – Unique identifier (cannot be changed after creation)
  • Name – Human-readable source name (e.g., “Production K8s Logs”)
  • Description – Optional description of what logs this source provides

Review your configuration and click “Create” to save the source.

  1. Use namespace filters to limit scope and improve performance
  2. Configure severity rules to enable colored log bars and severity-based grouping
  3. Use descriptive names indicating environment and purpose
  4. Select minimal default columns to keep the interface clean (you can always add more when querying)