Skip to content

[processor/resourcedetection]: Add support for k8s.cluster.name for local clustersΒ #35116

Closed
@MichaelKatsoulis

Description

@MichaelKatsoulis

Component(s)

processor/k8sattributes

Is your feature request related to a problem? Please describe.

When running Otel collector and resourcedetection processor in a local Kubernetes cluster created by kind, minikube or kube-adm there is no way currently to get the Kubernetes cluster name. These clusters are used very often for development, testing but also in production.

Describe the solution you'd like

Clusters created by kind, minikube and kube-adm produce a configmap in kube-system namespace called kubeadm-config. This looks like this and contains the cluster name.

apiVersion: v1
data:
  ClusterConfiguration: |
    apiServer:
      certSANs:
      - localhost
      - 127.0.0.1
      extraArgs:
        authorization-mode: Node,RBAC
        runtime-config: ""
      timeoutForControlPlane: 4m0s
    apiVersion: kubeadm.k8s.io/v1beta3
    certificatesDir: /etc/kubernetes/pki
    clusterName: kind
    controlPlaneEndpoint: kind-control-plane:6443

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestnever staleIssues marked with this label will be never staled and automatically removedprocessor/resourcedetectionResource detection processor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions