<p>I need to make some automation testing on the Kubernetes pod but the pods names keeps changing
like at first it was <strong>hisham-7cc8f99597</strong> then after some time it is like this
<strong>hisham-7cc8f99597-8j8lj</strong>
is there a way I can know what is the name of the pod right now so I can use the name in the automation scenario ?</p>

hisham droubi
<p>Pods are <a href="https://devops.stackexchange.com/questions/653/what-is-the-definition-of-cattle-not-pets">cattle, not pets (<code>devops.stackexchange.com</code>)</a>. Thus, pods do not have an identity. We should therefore never directly communicate with a pod, but rather expose pods through a <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Service</a> and communicate with the service instead. The service has a well-defined and constant name.</p>
