Download the latest components.yaml from below link:
Since metrics-server communicates by node host name, So I need hostAliases
add this hostAliases and kubelet-insecure-tls args to components.yaml
hostAliases:
- hostnames:
- s160
ip: 192.19.14.160
- hostnames:
- s161
ip: 192.19.14.161
- hostnames:
- s162
ip: 192.19.14.162
kubectl apply -f components.yaml and wait for~15 min.
$ kubectl top node
NAME CPU(cores) CPU% MEMORY(bytes) MEMORY%
s160 176m 4% 744Mi 19%
s161 44m 1% 273Mi 7%
s162 37m 0% 326Mi 8%
Done.