<p>I see this error in <code>kubectl describe podName</code>:</p>

<pre><code>  9m        2s      118 kubelet, gke-wordpress-default-pool-2e82c1f4-0zpw   spec.containers{nginx}      Warning     Unhealthy       Readiness probe failed: Get http://10.24.0.27:80/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
</code></pre>

<p>The container logs (nginx) is of the following: </p>

<pre><code>10.24.1.1 - - [22/Aug/2017:11:09:51 +0000] "GET / HTTP/1.1" 499 0 "-" "Go-http-client/1.1"
</code></pre>

<p>However if I exec into the container via <code>kubectl exec -it podName -c nginx sh</code>, and do a wget <code>http://localhost</code> I am able to succesfully get a HTTP 200 response. As well as if I SSH into the host (GCP compute instance), I'm able to successfully get a HTTP 200 response. </p>

<p>I believe this issue occurred shortly after I replace a LoadBalancer service with a NodePort service. I wonder if it's some port conflict?</p>

<p>The service in question:
<strong>wordpress-service.yaml</strong></p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  labels:
    app: wordpress
  name: wordpress
spec:
  type: NodePort
  ports:
    - port: 80
      targetPort: 80
      protocol: TCP
  selector:
    app: wordpress
</code></pre>

<p>The container is a Nginx container serving content on port 80.</p>

<p>What might be the cause of the readiness probe failing?</p>

<hr>

<p>If I remove the readiness probe in my config:</p>

<pre><code>      readinessProbe:
        httpGet:
          path: /
          port: 80
        initialDelaySeconds: 5 
        periodSeconds: 5
</code></pre>

<p>Everything works fine, the pods are able to be accessed via a LoadBalancer service.</p>

<p>ARGHUGIHIRHHHHHH.</p>

<p>I've been staring at this error for a day at least and for some reason I didn't comprehend it.</p>

<p>Essentially the error <code>net/http: request canceled (Client.Timeout exceeded while awaiting headers)</code> means the container took longer then the timeout period (default of 1s).</p>
