<p>I've set up Kubernetes DaemonSet Manifest for handling metrics in my project, and having a little problem of pinging this DaemonSet, So my Eventual Question is, (If I have a daemonset in every pod of my project, how can I ping Specific One or Just the One In order to make sure that everything okay with it?)  (Most Likely using <code>curl</code>, but would also consider some other ways too if it's possible:)</p>
<p>Example of DaemonSet I have</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: DaemonSet 
metadata:
  name: metrics-api-service 
spec:
  selector:
    matchLabels:
      app: api-metrics-app 
  template:
    metadata:
      labels:
        app: api-metrics-app 
    spec:
      terminationGracePeriodSeconds: 60
      containers:
        - name: api-metrics-service 
          image: image 
          livenessProbe:
            exec:
              &lt; what I need to put here In order to ping the DaemonSet ? &gt;
            initialDelaySeconds: 60 
          resources:
            limits:
              cpu: &quot;0.5&quot;
              memory: &quot;500Mi&quot;
            requests:
              cpu: &quot;0.4&quot;
              memory: &quot;200Mi&quot;

</code></pre>
<p>Thanks</p>

CraZyCoDer
<p>One way to do this would be to lookup for your Pods IP addresses, then query each of them.</p>
<pre><code>for i in $(kubectl get pods -n logging get pods \
    -l app=api-metrics-app \
    -o jsonpath='{.items[*].status.podIP}')
do
    curl http://$i:4242/metrics
done
</code></pre>
