title: Connecting to Kubernetes API from pod
body: <p>I'm trying to use Kubernetes API from inside a pod. Going to list/watch pods and custom defined resources.</p>
  
  <p>Construct url as "<a href="https://KUBERNETES_SERVICE_HOST:KUBERNETES_SERVICE_PORT_HTTPS" rel="nofollow noreferrer">https://KUBERNETES_SERVICE_HOST:KUBERNETES_SERVICE_PORT_HTTPS</a>"
  Authorization header = "Bearer /var/run/secrets/kubernetes.io/serviceaccount/token"
  CaCert = /var/run/secrets/kubernetes.io/serviceaccount/ca.crt</p>
  
  <p>When running inside minikube, the request fails with "Error: connect ETIMEDOUT 10.96.0.1:443"
  Same code running in GCP fails with: "Error: unable to verify the first certificate"</p>