Edge Delta Kubernetes Input

Monitor Kubernetes pods and namespaces.

Overview

You can use the Kubernetes Input node to specify which Kubernetes pods and namespaces the agent should monitor.

Example Configuration

nodes:
  - name: my_k8s_input
    type: kubernetes_input
    include:
      - "k8s_pod_name=^apache.*$,k8s_namespace=.*web*"
    exclude:
      - "k8s_namespace=^kube-nginx$"
      - "k8s_pod_name=.*nginx*,k8s_controller_kind=StatefulSet"

Required Parameters

name

A descriptive name for the node. This is the name that will appear in Visual Pipelines and you can reference this node in the yaml using the name. It must be unique across all nodes. It is a yaml list element so it begins with a - and a space followed by the string. It is a required parameter for all nodes.

nodes:
  - name: <node name>
    type: <node type>

type: kubernetes_input

The type parameter specifies the type of node being configured. It is specified as a string from a closed list of node types. It is a required parameter.

nodes:
  - name: <node name>
    type: <node type>

Optional Parameters

exclude and include

The include and exclude parameter are used to filter based on Kubernetes components. They are specified with regex or full text. If exclude is specified it drops logs that match its regex rules. Comma separated values indicate AND rules, while separate rules indicate OR matching. In this example logs that match rule-1 and rule-2 are excluded. Logs that match rule-3 are also excluded. A log matching only rule-1 would not be excluded.

  • If neither include nor exclude are specified, then everything from the input is passed.
  • If include is specified as well as exclude, then logs matching in include are passed unless they are dropped by exclude.
nodes:
  - name: <node name>
    type: kubernetes_input
    exclude:
        - "rule-1,rule-2"
        - "rule-3"

The following values can be excluded from a Kubernetes input:

  • k8s_pod_name
  • k8s_namespace
  • k8s_controller_kind
  • k8s_container_name
  • k8s_container_image

For example:

  • k8s_container_name=apache*,k8s_container_image=.*latest$
  • k8s_pod_name=^apache.*$,k8s_namespace=.web