I am not sure what is the cause of your issue. But the error you quoted makes me wonder if you Kubernetes cluster is healthy. Do other requests to the API server let's say with kubectl
succeed any other indications that the Kubernetes control plane is unhealthy?
Get "https://10.0.0.1:443/api/v1/namespaces/elastic-system/configmaps/elastic-operator-leader?timeout=1m0s": context deadline exceeded