<p>How do I get the pod associated with a job via the Kubernetes REST API? I cannot figure out how the two are related/linked other than by similar (but not the same) generated names.</p>

<p>You can send a LIST request for pods, with <a href="https://github.com/kubernetes/apimachinery/blob/d16981aedf33f88b7434bd3bdbcc2e1f940aecd0/pkg/apis/meta/v1/types.go#L355" rel="nofollow noreferrer">ListOptions.LabelSelector</a> set to the <a href="https://github.com/kubernetes/api/blob/dcce3486da333605791aa8b98536ca01893194d6/batch/v1/types.go#L99" rel="nofollow noreferrer">selector of the Job</a>.</p>

<p>If you are not using the <a href="https://github.com/kubernetes/client-go" rel="nofollow noreferrer">go client</a> for kubernetes, you need to spell the LabelSelector as a query parameter, e.g., <code>https://&lt;host_address&gt;/api/v1/namespaces/default/pods?labelSelector=component%3Dspark-master</code></p>
