kubernetes / kubernetes/kubernetes

Harden addons & system pods

Open
#38,541 14 comments 5 reactions 0 assignees View on GitHub
area/security help wanted kind/cleanup lifecycle/frozen priority/important-longterm sig/auth
Dominant language
Go
Stars
128k
Forks
44.3k
Avg merge
5d 17h
Merged PRs (30d)
208

Description

Our system pods should run using security best practices, both to enhance cluster security and serve as examples of best practices to users. We should audit all our system pod Dockerfiles, and make sure all security features are enabled with custom profiles when possible.

Low hanging fruit:

- Run as non-root (& disallow privilege escalation)
- Run with the default seccomp profile
- ReadOnlyRootFilesystem
- Avoid unnecessary HostPath volumes
- Don't mount service account token (unless required)

More advanced:

- Reduce depednencies in the base image (https://github.com/kubernetes/kubernetes/issues/40248)
- Custom seccomp profile
- Custom AppArmor profile
- Drop unneeded capabilities (e.g. `CAP_NET_RAW`)
- ~~Run with restricted service accounts~~ (done)

/cc @kubernetes/sig-auth @kubernetes/sig-cluster-lifecycle

Contributor guide

Open the contributing guide

Research direction

Start by auditing all system pod Dockerfiles and their corresponding pod configuration against the listed security practices. Check which controls apply to each pod, including non-root execution, seccomp, read-only filesystems, HostPath volumes, service account tokens, capabilities, and security profiles. Done means applicable protections are enabled or an exception is documented for every system pod.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes
Domain
infrastructure, security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.