<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>Healthcheck should be enough to making sure if its working or not, but if you still want to confirm from the external side then make sure your daemon set exposes the port and the security group allow internal traffic, you can ping/curl same node where the daemon set is running, every daemonset will get the node IP as an environment variable.</p>
<p>Pass  the <code>HOST_IP</code> in the daemonset environment variable</p>
<pre><code>env:
  - name: HOST_IP
    valueFrom:
      fieldRef:
        fieldPath: status.hostIP
</code></pre>
<p>and then update the liveness probe accordingly</p>
<pre><code>livenessProbe:
  exec:
    command:
    - sh
    - -c
    - curl -s $HOST_IP:PORT/healthcheck
</code></pre>
<p>I will recommend <code>HTTP</code> check over bash</p>
<pre><code>healthcheck:
    initialDelaySeconds: 100
    periodSeconds: 10
    timeoutSeconds: 5
    httpGet:
      path: /metrics
      port: 3000  
</code></pre>
<p>if <code>/metrics</code> seems working, just return <code>200</code> status code.</p>
