<p>How do I define distinct Pod ports, one for application and another for health check (readinessProbe)?</p>

<p>Is the specification for ports, shown below, a correct way to make the readinessProbe to check the health check port TCP/9090 ? I mean, is the readinessProbe going to reach port 9090 (assuming it is open by the running container of course) ? Or does one need to specify any other port (nodePort, targetPort, port, whatever) ?</p>

<pre><code>kind: Deployment
spec:
  template:
    spec:
      containers:
      - name: myapp
        image: &lt;image&gt;
        ports:
        - name: myapp-port
          containerPort: 8080
          protocol: TCP
        - name: healthcheck-port
          containerPort: 9090
          protocol: TCP

        readinessProbe:
          httpGet:
            port: healthcheck-port
            scheme: HTTP
          initialDelaySeconds: 60
          timeoutSeconds: 5
          periodSeconds: 10
          successThreshold: 2
          failureThreshold: 2
</code></pre>

Everton
<p>Yes, your specification snippet is <em>almost</em> correct. You don't need to specify any thing else to make readiness probe work. </p>

<p>Port names cannot be more than 15 characters, so the name <code>healthcheck-port</code> won't work. You might want to change the name to something smaller like <code>healthcheck</code>. </p>
