Help needed on metrics server

Environment setup:
1.Master node(Ubuntu 16.04)
2. Worker node (Windows 2019)

Requirement:
To get the metrics of both master and worker nodes with the metrics server

Issue Description:
We have setup a master node and a windows worker node. We have installed our demo containers in both the nodes. Inorder to get the metrics of the pods that are running in both the nodes we installed metrics server on the master node. Both the nodes are inside vpn network. Both the nodes are able to ping each other. We used the below link to install the metrics server
https://github.com/kubernetes-incubator/metrics-server – used 1.8+

Below is my metrics server service config file:

Please edit the object below. Lines beginning with a ‘#’ will be ignored,

and an empty file will abort the edit. If an error occurs while saving this file will be

reopened with the relevant failures.

apiVersion: v1
kind: Service
metadata:
creationTimestamp: “2019-03-04T07:07:41Z”
labels:
kubernetes.io/name: Metrics-server
name: metrics-server
namespace: kube-system
resourceVersion: “306749”
selfLink: /api/v1/namespaces/kube-system/services/metrics-server
uid: 33466558-3e4c-11e9-bf84-02277461b2b2
spec:
clusterIP: 10.107.181.204
ports:

  • port: 443
    protocol: TCP
    targetPort: 443
    selector:
    k8s-app: metrics-server
    sessionAffinity: None
    type: ClusterIP
    status:
    loadBalancer: {}

What we found is the metrics server is able to get the metrics of the node and pods running on the Linux master node but we are unable to get the metrics of the windows node and its pods.

Below are the logs obtained by running the logs command:
$ kubectl logs metrics-server-8cccd88dc-8dtdl -n kube-system
E0307 17:53:16.372840 1 manager.go:102] unable to fully collect metrics: [unable to fully scrape metrics from source kubelet_summary:ec2amaz-b39mdae: unable to fetch metrics from Kubelet ec2amaz-b39mdae (10.244.1.2): Get https://10.244.1.2:10250/stats/summary/: dial tcp 10.244.1.2:10250: i/o timeout, unable to fully scrape metrics from source kubelet_summary:ec2amaz-3679ret: unable to fetch metrics from Kubelet ec2amaz-3679ret (10.244.2.2): Get https://10.244.2.2:10250/stats/summary/: dial tcp 10.244.2.2:10250: i/o timeout]

Can you please let us know what could be the issue

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml
You can use this to install metrics server in a right way
also to check metrics use
kubectl top node

You can use the below repo and it’s working for me
Pull the git https://github.com repository for the deployment files.

/kodekloudhub/kubernetes-metrics-server.git