impaired / delayed connectivity of Cluster-IPs from k8s master node
Here is what I did to make it work:
1.Set - --enable-aggregator-routing=true
flag in kube API Server.
2.Set below flags in metrics-server-deployment.yaml
- --kubelet-insecure-tls- --kubelet-preferred-address-types=InternalIP
3.Set hostNetwork: true
in metrics-server-deployment.yaml
Update: fixed in Kubernetes 1.18.6 this bug
This issue is related to weird flannel bug(s) with vxlan backend which causes NAT rules and/or routing entries to be missing or incomplete:
https://github.com/coreos/flannel/issues/1243
https://github.com/coreos/flannel/issues/1245
As a workaround, setting up a static route (to the service network via cni0 interface) on my nodes helped me instantly:
ip route add 10.96.0.0/12 dev cni0