Hi Team, am unbale to scrape the kube-scheduler via Prometheus -status "*<http:/ . . .

Prakash:
Hi Team, am unbale to scrape the kube-scheduler via Prometheus -status “<http://192.168.29.88:30000/targets?search=#pool-serviceMonitor/monitoring/prometheus-kube-prometheus-kube-scheduler/0|serviceMonitor/monitoring/prometheus-kube-prometheus-kube-scheduler/0 (0/2 up)>” . if i curl with ip using http link i am getting error “Client sent an HTTP request to an HTTPS server” and with https i don’t have any issues. any help/inputs/suggestion/pointers is much appreciated

elg nouhaila:
Hello @Prakash I understand that you want to configure the kube-scheduler to serve traffic over HTTP instead of HTTPS. While it is strongly recommended to use HTTPS.
Here are the steps to reconfigure the kube-scheduler to serve traffic over HTTP:

  1. Modify kube-scheduler Manifest: Edit the kube-scheduler manifest located a/etc/kubernetes/manifests/kube-scheduler.yaml on the master nodes. Remove or comment out the --secure-port, --bind-address, --tls-cert-file, and --tls-private-key-file flags. Make sure the --port flag is set to the desired HTTP port.
  2. Update Service and Endpoints: If there are Service and Endpoints or EndpointSlice objects defined for the kube-scheduler, update them to reflect the new HTTP port.
  3. Update Prometheus Configuration: Update the ServiceMonitor or Prometheus configuration to use the http scheme and the new HTTP port.

Prakash:
Thank you let me try and update

Blaise Pabon:
I just ran into a similar problem, except that I want to serve over https and there seems to be no route to the hosts address. (running k3s on Fedora)
I can think of two scenarios and I wonder if I’m on the right track…
• coreDNS is resolving localhost.localdomain to the server’s address instead of the cluster (so maybe I have to set up a nodeport?)
• There is no path from the cluster to the hosts IP stack… ?

Edit: it was firewalld , the k3s site lists the ports that need to be opened.

Prakash:
https://stackoverflow.com/questions/73031228/getting-kubecontrollermanager-kubeproxy-kubescheduler-down-alert-in-kube-prome