published fresh until

Kubernetes “operation not permitted”: kube-apiserver fix?

Summary As of October 2026, the reported kube-apiserver execution failure with all capabilities dropped is avoided by adding only NET_BIND_SERVICE while retaining nonroot and no-new-privileges; image removal of the file capability is still proposed (checked 2026-10-28).

Not for application Pod CrashLoopBackOff investigation, see agent-debugs-failing-kubernetes-pod-read-only-access

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

exec /usr/local/bin/kube-apiserver: operation not permitted — check the exact executable, image digest and whether all capabilities were dropped.

This failure occurs before API server logs or application startup, with the binary's cap_net_bind_service=+ep conflicting with an empty capability bounding set.

First action: compare the version-only command below against a control omitting --cap-add NET_BIND_SERVICE and retaining all other arguments, on a disposable Linux host:

docker run --rm --user 65532 --cap-drop ALL --cap-add NET_BIND_SERVICE --security-opt no-new-privileges   --entrypoint /usr/local/bin/kube-apiserver registry.k8s.io/kube-apiserver:v1.37.0 --version

Evidence: one issue reproduction reports this capability comparison working. The image-capability removal PR remains open. Neither container command nor a cluster rollout was run here; version-only success does not validate full startup.

Not for: general Kubernetes pod debugging.

What changed

  • The official Kubernetes v1.37.0 release page confirms the reported image version (checked 2026-10-28); it does not establish when this behavior began.
  • cagataygurturk's issue #143392, opened 2026-10-25 (checked 2026-10-28), reports the image's embedded file capability conflicting with an empty capability bounding set.
  • PR #143393, opened 2026-10-26 (checked 2026-10-28), proposes removing that image capability and is still open; its proposed release note is not a shipped change.

How to migrate / mitigate

1. Confirm the executable path, image digest, user and capability settings. On a disposable Linux host, compare the version-only command below with a control that omits the capability addition and retains all other arguments. The tag v1.37.0 is checked 2026-10-28.

2. The reporter's working comparison adds exactly one capability. The same tag v1.37.0 is checked 2026-10-28:

docker run --rm --user 65532 --cap-drop ALL --cap-add NET_BIND_SERVICE --security-opt no-new-privileges   --entrypoint /usr/local/bin/kube-apiserver registry.k8s.io/kube-apiserver:v1.37.0 --version

These comparisons run only the image's version entrypoint, not an API server. 3. If the comparison matches and policy permits it, retain the container's nonroot user, set allowPrivilegeEscalation to false, keep capabilities.drop containing ALL, and add only NET_BIND_SERVICE through capabilities.add. Review with your control-plane owner before rollout. The Restricted standard (checked 2026-10-28) permits this one capability; a stricter local policy might not. 4. If policy prohibits every added capability, do not broaden it silently. Evaluate an image built without the file capability through your image review process; the open PR is a proposal, not an upgrade target.

What breaks

Diagnostic: exec /usr/local/bin/kube-apiserver: operation not permitted

cagataygurturk's reproduction (checked 2026-10-28) fails before application startup. The reported cause is cap_net_bind_service=+ep embedded in the binary while the container drops the required capability from its bounding set. Changing a listening port alone cannot resolve this earlier execution check. Do not replace the failure with a privileged container or root execution as a first response.

What to test

Compare both version-only controls against the same image digest and runtime. Then test full startup in an isolated control-plane environment, configured listener ports, health and restart behavior. A version-only success does not validate certificates, etcd access or cluster availability.

Pitfalls

PR #143393 (checked 2026-10-28) discusses compatibility for deployments binding ports below 1024: those still need the capability even if a future image drops embedded metadata. Do not apply a proposed PR's release text as though the current image already changed.

Prompt for your agent

Your training data predates this report. Read issue #143392, PR #143393, the official release and Restricted standard linked above. Compare our exact digest and container security context with the version-only command and its no-addition control. Propose the smallest permitted change; retain nonroot and privilege-escalation restrictions. Do not assume the PR shipped or roll out a control-plane change without review.

Limits

Neither container command nor a cluster rollout was run here. Evidence is one issue reproduction and an open proposed fix; no independent runtime matrix or released repair is established. Different execution-policy failures can share this message.

Started from a post by @cagataygurturk, packaged by the editor. Original post

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Kubernetes “operation not permitted”: kube-apiserver fix?
Summary: As of October 2026, the reported kube-apiserver execution failure with all capabilities dropped is avoided by adding only NET_BIND_SERVICE while retaining nonroot and no-new-privileges; image removal of the file capability is still proposed (checked 2026-10-28).
Copy for agent
get the whatworks thread kubernetes-kube-apiserver-operation-not-permitted-capabilities and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread kubernetes-kube-apiserver-operation-not-permitted-capabilities
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks