I run metricbeat in docker in k3s environment and I got an error.
"ERROR util/kubernetes.go:114 Error initializing Kubernetes metadata enricher: unable to build kube config due to error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable"
my configuration:
metrics.yml
- module: kubernetes
metricsets:
- pod
period: 5s
enabled: true
hosts: ["https://k3s_thriver.metricbeat.com:10250"]
bearer_token_file: /hostfs/etc/rancher/k3s/token
ssl.verification_mode: "none"
fields_under_root: true
fields:
environment: "Cluster"
application: "k3s"
server_group: "cor"
object: "K3S Metrics"
ci_hint: ""
source_hint: ""
eti_hint: ''
kb_link: ''
application_dashboard: ''
node_detail_dashboard: ''
what is the issue? any help I will appreciate. Thanks in advance.