Getting error while trying to communicate with apiserver in kube-state-metrics pod
This doesn't look like kube-state-metrics but your node configuration/networking issue. You will need to debug node to node communication. I would start by checking on which nodes the kube-state-metrics is scheduled and launch a temporary pod on that node to see if you can access the API Server pod correctly. The error could be in subnet, security groups/ firewalls, or other networking and security-related components.