Skip to content

Commit 4000144

Browse files
authored
AKS KubeletStats Receiver config (#1773)
* AKS KubeletStats Receiver config Signed-off-by: Dani Louca <[email protected]>
1 parent a93c251 commit 4000144

File tree

5 files changed

+46
-2
lines changed

5 files changed

+46
-2
lines changed

.chloggen/kubeletAKS.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: bug_fix
3+
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
4+
component: agent
5+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
6+
note: Configure AKS KubeletStats receiver to use the appropriate CA file. For more information, see the following link
7+
https://github.com/signalfx/splunk-otel-collector-chart/blob/main/docs/advanced-configuration.md#aks-kubeletstats-receiver
8+
# One or more tracking issues related to the change
9+
issues: [1773]
10+
# (Optional) One or more lines of additional information to render under the primary note.
11+
# These lines will be padded with 2 spaces and then inserted directly into the document.
12+
# Use pipe (|) for multiline entries.
13+
subtext:

docs/advanced-configuration.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,32 @@ scrape additional metadata. The supported options are:
6262

6363
This value can be omitted if none of the values apply.
6464

65+
## AKS KubeletStats Receiver
66+
67+
Unlike other Kubernetes distributions, `AKS` does not generate the kubelet’s
68+
self-signed certificate using the Certificate Authority that issues the
69+
kube-apiserver certificate, `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt`
70+
and it only adds the node name in its certificate Subject Alternative Name.
71+
72+
When `distribution` is set to `aks`, the chart automatically sets the custom `ca_file`
73+
option to `/hostfs/etc/kubernetes/certs/kubeletserver.crt` and uses the node name in
74+
its endpoint.
75+
76+
For custom setups (e.g., custom certificates, Windows nodes, or Linux nodes with virtual network using custom DNS),
77+
adjust `ca_file` and use the node IP instead.
78+
If you don't have access to the CA file, add `insecure_skip_verify: true` to the `kubeletstats` receiver config.
79+
80+
```yaml
81+
agent:
82+
config:
83+
receivers:
84+
kubeletstats:
85+
ca_file: <Path to custom CA file>
86+
endpoint: ${K8S_NODE_IP}:10255
87+
```
88+
89+
90+
6591
## Deployment environment
6692

6793
Optional `environment` parameter can be used to specify an additional `deployment.environment`

examples/distribution-aks/rendered_manifests/configmap-agent.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ data:
164164
endpoint: 0.0.0.0:14268
165165
kubeletstats:
166166
auth_type: serviceAccount
167+
ca_file: /hostfs/etc/kubernetes/certs/kubeletserver.crt
167168
collection_interval: 10s
168-
endpoint: ${K8S_NODE_IP}:10250
169+
endpoint: ${K8S_NODE_NAME}:10250
169170
extra_metadata_labels:
170171
- container.id
171172
metric_groups:

examples/distribution-aks/rendered_manifests/daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
component: otel-collector-agent
3333
release: default
3434
annotations:
35-
checksum/config: 4450d109fdc1562316ee72cb051a34ebfc50188fa0fd19373f5bb7a838bdfe5f
35+
checksum/config: c2ecd4ea42969f8a53213e82d901735533d759c1f46238c4c4b48bed124f89d9
3636
kubectl.kubernetes.io/default-container: otel-collector
3737
spec:
3838
hostNetwork: true

helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ receivers:
381381
# use the read-only endpoint instead.
382382
auth_type: none
383383
endpoint: ${K8S_NODE_IP}:10255
384+
{{ else if eq .Values.distribution "aks" }}
385+
ca_file: "/hostfs/etc/kubernetes/certs/kubeletserver.crt"
386+
endpoint: ${K8S_NODE_NAME}:10250
387+
auth_type: serviceAccount
384388
{{- else }}
385389
auth_type: serviceAccount
386390
endpoint: ${K8S_NODE_IP}:10250

0 commit comments

Comments
 (0)