Docs
uk8s
Cluster Monitoring
Prometheus monitoring solution
Common Questions about Monitoring

Common Questions about Monitoring

1. Unable to collect monitoring information for kube-scheduler

The monitoring component cannot collect monitoring information for the kube-scheduler. The reason may be that Prometheus is configured to collect /metrics through the HTTPS port (10259), but the kube-scheduler does not support exposing the /metrics interface through the HTTPS port.

Solution: Log in to the three master nodes in turn, modify the /usr/lib/systemd/system/kube-scheduler.service file, and add two parameters: --authentication-kubeconfig and --authorization-kubeconfig.

[Service]
EnvironmentFile=-/etc/kubernetes/config
ExecStart=/usr/local/bin/kube-scheduler \
            $KUBE_LOGTOSTDERR \
            $KUBE_LOG_LEVEL \
            --config=/etc/kubernetes/kube-scheduler.conf \
            --authentication-kubeconfig=/etc/kubernetes/kubelet.kubeconfig \
            --authorization-kubeconfig=/etc/kubernetes/kubelet.kubeconfig

Then execute systemctl restart kube-scheduler.