Edge Delta Kubernetes Input
3 minute read
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.namespace.name=.*"
exclude:
- "k8s.namespace.name=kube-system,k8s.namespace.name=kube-public,k8s.namespace.name=kube-node-lease,k8s.pod.name=edgedelta,k8s.pod.name=prometheus,k8s.pod.name=promtail,k8s.pod.name=node-exporter"
The
Include
andExclude
examples use the OTEL schema. OTEL requires agent version 0.1.81 or higher. Previous agent versions used the legacy schema, for examplek8s_pod_name
, which is still supported in agent versions after 0.1.81.
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>
include
The include
parameter is used to specify the scope of traffic sources to be ingested. It is specified in OTEL format with Golang regex or full text. If exclude
is also specified, then logs matching in include
are passed unless they are dropped by exclude
. Include is required.
nodes:
- name: <node name>
type: kubernetes_input
include:
- k8s.namespace.name=.*
The following values can be included in the scope for a Kubernetes input:
- k8s.pod.name
- k8s.namespace.name
- k8s.cronjob.name
- k8s.daemonset.name
- k8s.deployment.name
- k8s.job.name
- k8s.replicaset.name
- k8s.statefulset.name
- k8s.container.name
- k8s.container.image
You use
k8s.xxx.name=.+
rather thank8s.controller.kind=xxx
, which is not supported.
Optional Parameters
exclude
The exclude
parameter is used to excluded traffic from certain components from being ingested. It is specified in OTEL format with Golang regex or full text. If exclude
is specified it drops logs that match its Golang 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. Exclude is optional.
- If
include
is specified as well asexclude
, then logs matching ininclude
are passed unless they are dropped byexclude
.
nodes:
- name: <node name>
type: kubernetes_input
include:
- "k8s.namespace.name=.*"
exclude:
- "rule-1,rule-2"
- "rule-3"
The following values can be excluded from a Kubernetes input:
- k8s.pod.name
- k8s.namespace.name
- k8s.cronjob.name
- k8s.daemonset.name
- k8s.deployment.name
- k8s.job.name
- k8s.replicaset.name
- k8s.statefulset.name
- k8s.container.name
- k8s.container.image
For example:
"k8s.namespace.name=.*"
"k8s.namespace.name=kube-system,k8s.namespace.name=kube-public,k8s.namespace.name=kube-node-lease,k8s.pod.name=edgedelta,k8s.pod.name=prometheus,k8s.pod.name=promtail,k8s.pod.name=node-exporter"
You use
k8s.xxx.name=.+
rather thank8s.controller.kind=xxx
, which is not supported.