<p>I'm trying to configure a daemonset to run on the global pid namespace resulting the ability to see other processes in the host, including the containers' processes.</p>
<p>I couldn't find an option to achieve this.
In general, what I'm looking for is close to the sidecar container <code>shareProcessNamespace</code> attribute only on the host level.</p>

<p>There is an attribute that allows this - <code>hostPID: true</code></p>
<p>So the yaml file should looks something like that:</p>
<pre><code>apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: busybox
spec:
  selector:
    matchLabels:
      name: busybox
  template:
    metadata:
      labels:
        name: busybox
    spec:
      hostPID: true
      containers:
      - name: busybox
        image: busybox
        command: [ &quot;sh&quot;, &quot;-c&quot;, &quot;sleep 1h&quot; ]
</code></pre>
<p>More info in:</p>
<ul>
<li><a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces</a></li>
<li><a href="https://medium.com/@chrispisano/limiting-pod-privileges-hostpid-57ce07b05896" rel="nofollow noreferrer">https://medium.com/@chrispisano/limiting-pod-privileges-hostpid-57ce07b05896</a></li>
</ul>
