Hi Chris,
Please find the details you requested for:
metricbeatConfig:
metricbeat.yml: |
metricbeat.modules:
- module: kubernetes
metricsets:
- container
- node
- pod
- system
- volume
period: 10s
host: "${NODE_NAME}"
hosts: ["https://${NODE_NAME}:10250"]
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
ssl.verification_mode: "none"
# If using Red Hat OpenShift remove ssl.verification_mode entry and
# uncomment these settings:
#ssl.certificate_authorities:
#- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
processors:
- add_kubernetes_metadata: ~
Also, I was able to execute the curl command and reach the kubelet api without any issues.
> umesh@umeshs-MacBook-Pro Local-ELK % kubectl exec -it my-metricbeat-metricbeat-4tht9 -- /bin/bash
> [root@k8s-rke-cluster1-node2 metricbeat]#
> [root@k8s-rke-cluster1-node2 metricbeat]#
> [root@k8s-rke-cluster1-node2 metricbeat]#
> [root@k8s-rke-cluster1-node2 metricbeat]# token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
> [root@k8s-rke-cluster1-node2 metricbeat]# curl -H "Authorization: Bearer $token" https://${HOSTNAME}:10250/stats/summary --insecure
> {
> "node": {
> "nodeName": "k8s-rke-cluster1-node2",
> "systemContainers": [
> {
> "name": "kubelet",
> "startTime": "2021-02-08T03:14:19Z",
> "cpu": {
> "time": "2021-02-08T16:48:42Z",
> "usageNanoCores": 32691702,
> "usageCoreNanoSeconds": 1536862822056
> },
> "memory": {
> "time": "2021-02-08T16:48:42Z",
> "usageBytes": 179445760,
> "workingSetBytes": 57331712,
> "rssBytes": 49405952,
> "pageFaults": 32014689,
> "majorPageFaults": 81
> }
> },
> {
> "name": "runtime",
> "startTime": "2021-02-08T03:14:16Z",
> "cpu": {
> "time": "2021-02-08T16:48:38Z",
> "usageNanoCores": 30031690,
> "usageCoreNanoSeconds": 1571225630130
> },
> "memory": {
> "time": "2021-02-08T16:48:38Z",
> "usageBytes": 6586425344,
> "workingSetBytes": 3134005248,
> "rssBytes": 87359488,
> "pageFaults": 70791372,
> "majorPageFaults": 333
> }
> },
> {
> "name": "pods",
> "startTime": "2021-02-08T03:14:18Z",
> "cpu": {
> "time": "2021-02-08T16:48:35Z",
> "usageNanoCores": 142213300,
> "usageCoreNanoSeconds": 9085480733540
> },
> "memory": {
> "time": "2021-02-08T16:48:35Z",
> "availableBytes": 13652520960,
> "usageBytes": 3504705536,
> "workingSetBytes": 3173511168,
> "rssBytes": 3094118400,
> "pageFaults": 0,
> "majorPageFaults": 0
> }
> }
> ],
> "startTime": "2021-02-08T03:14:11Z",
> "cpu": {
> "time": "2021-02-08T16:48:35Z",
> "usageNanoCores": 241303905,
> "usageCoreNanoSeconds": 13295512173772
> },
> "memory": {
> "time": "2021-02-08T16:48:35Z",
> "availableBytes": 10005635072,
> "usageBytes": 11078508544,
> "workingSetBytes": 6820397056,
> "rssBytes": 3609812992,
> "pageFaults": 444927,
> "majorPageFaults": 84
> },