<p>Looking into Kubernetes documentation:</p>

<ul>
<li><a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/" rel="noreferrer">Pod Security Policy</a></li>
<li><a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" rel="noreferrer">Pod Security Context</a></li>
</ul>

<p>Mmmm... aren't eventually they doing the same? What is the difference?</p>

<p>I have no idea why folks are down-voting this question, it's spot on and actually we've got our docs to blame and not the OP. OK, here goes:</p>

<p>The pod security context (which is preceded by and largely based on OpenShift <a href="https://docs.openshift.com/container-platform/3.9/admin_guide/manage_scc.html" rel="noreferrer">Security Context Constraints</a>) allows you (as a developer?) to define runtime restrictions and/or settings on a per-pod basis.</p>

<p>But how do you enforce this? How do you make sure that folks are actually defining the constraints? That's where pod security policies (PSP) come into play: as a cluster or namespace admin you can define and enforce those security context-related policies using PSPs. See also the <a href="https://kubernetes-security.info/" rel="noreferrer">Kubernetes Security</a> book for more details. </p>
