{
  "id": "kubernetes-security-context-table",
  "kind": "table",
  "slug": "kubernetes-security-context",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/kubernetes-security-context/",
  "title": "Kubernetes securityContext - run as non-root, drop capabilities, read-only root filesystem",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "runAsUser: 1000",
      "source": "Kubernetes docs",
      "detail": "makes all processes in every container run with user ID 1000."
    },
    {
      "name": "runAsGroup",
      "source": "Kubernetes docs",
      "detail": "sets the primary group ID; if omitted, the primary group of the containers will be root(0)."
    },
    {
      "name": "allowPrivilegeEscalation",
      "source": "Kubernetes docs",
      "detail": "controls whether a process can gain more privileges than its parent, for example through a setuid binary. If not defined, it defaults to true."
    },
    {
      "name": "allowPrivilegeEscalation: false",
      "source": "Kubernetes docs",
      "detail": "cannot be combined with a privileged container or one with CAP_SYS_ADMIN."
    },
    {
      "name": "readOnlyRootFilesystem",
      "source": "Kubernetes docs",
      "detail": "mounts the container's root filesystem as read-only."
    },
    {
      "name": "capabilities",
      "source": "Kubernetes docs",
      "detail": "add or drop Linux capabilities, granting certain privileges without all the privileges of the root user."
    }
  ],
  "related_slugs": [
    "kubernetes-pods",
    "kubernetes-rbac"
  ],
  "license": "CC-BY-4.0",
  "source_license": "CC-BY-4.0 (Kubernetes docs); CC-BY-4.0 (kubernetes/website (GitHub)); prose restates cited source lines in own words",
  "as_of": "2026-11-18",
  "status": "fill-draft-20261118",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}