<p>i have kubernetes cluster with pods which are type cluster IP. Which is the correct ip to shoot it if want to run integration tests IP:10.102.222.181 or Endpoints: 10.244.0.157:80,10.244.5.243:80</p>
<h1>for example:</h1>
<pre><code>Type:              ClusterIP
IP Families:       &lt;none&gt;
IP:                10.102.222.181
IPs:               &lt;none&gt;
Port:              http  80/TCP
TargetPort:        80/TCP
Endpoints:         10.244.0.157:80,10.244.5.243:80
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>

Alexa
<p>If your test runner is running inside the cluster, use the <code>name:</code> of the Service as a host name.  Don't use any of these IP addresses directly.  Kubernetes provides a <a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="nofollow noreferrer">DNS service</a> that will translate the Service's name to its address (the <code>IP:</code> from the <code>kubectl describe service</code> output), and the <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Service</a> itself just forwards network traffic to the <code>Endpoints:</code> (individual pod addresses).</p>
<p>If the test runner is outside the cluster, none of these DNS names or IP addresses are reachable at all.  For basic integration tests, it should be enough to <code>kubectl port-forward service/its-name 12345:80</code>, and then you can use <code>http://localhost:12345</code> to reach the service (actually a fixed single pod from it).  This isn't a good match for performance or load tests, and you'll either need to launch these from inside the cluster, or to use a <code>NodePort</code> or <code>LoadBalancer</code> service to make the service accessible from outside.</p>
