Skip to content

Metrics API

By default, the k8s metrics-api is not installed. This is useful to get basic node and pod metrics.

Example kubectl of metrics-server api

kubectl top nodes

The k8s metrics-server https://kubernetes-sigs.github.io/metrics-server/ is installed as part of the build-cluster-foundation playbook.

Ignoring Invalid Kubelet Certificates

Despite the chart allowing insecureSkipTLSVerify to pull metrics from an untrusted kubelet server, it was necessary to update the defaultArgs to the metrics-server.

The last argument has to be added to the metrics-server chart values. The first four are found by inspecting the default args of the metrics-server pod.

    values:
      defaultArgs:
        - --cert-dir=/tmp
        - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
        - --kubelet-use-node-status-port
        - --metric-resolution=15s
        - --kubelet-insecure-tls