<p>Going through <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer">this</a> doc, was wondering if there is a way to restrict unix socket creation using Kubernetes Network policies.</p>

ambikanair
<p><strong>Kubernetes network policies</strong> can’t restrict <strong>unix socket</strong> creation, they can only be useful for managing the traffic flow in between the pods. If you want to restrict new unix sockets from getting created you need to configure the <strong>SElinux parameter</strong> in the <strong>security context</strong> field of the kubernetes manifest file. This feature is only available in the recent releases of <em><strong>kubernetes 1.25</strong></em> and above. Follow this <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#assign-selinux-labels-to-a-container" rel="nofollow noreferrer"><strong>official documentation</strong></a> for more information</p>
