Metric server not working : unable to handle the request (get nodes.metrics.k8s.io) Metric server not working : unable to handle the request (get nodes.metrics.k8s.io) kubernetes kubernetes

Metric server not working : unable to handle the request (get nodes.metrics.k8s.io)


It started working after I edited the metrics-server deployment yaml config to include a DNS policy.

hostNetwork: true

Click here to view the image description

Refer to the link below:https://www.linuxsysadmins.com/service-unavailable-kubernetes-metrics/


Default value of Calico net is 192.168.0.0/16There is a comment in yaml file:

The default IPv4 pool to create on startup if none exists. Pod IPswill be chosen from this range. Changing this value after installationwill have no effect. This should fall within --cluster-cidr.

  • name: CALICO_IPV4POOL_CIDR value: "192.168.0.0/16"

So, its better use different one if your home network is contained in 192.168.0.0/16.

Also, if you used kubeadm you can check your cidr in k8s:

kubeadm config view | grep Subnet

Or you can use kubectl:

kubectl  --namespace kube-system get configmap kubeadm-config -o yaml

Default one in kubernetes "selfhosted" is 10.96.0.0/12