Skip to content

executors: Document scaling native Kubernetes executors across pods and nodes - #2182

Draft
marcleblanc2 wants to merge 4 commits into
mainfrom
marc/executor-k8s-scaling
Draft

marcleblanc2 wants to merge 4 commits into
mainfrom
marc/executor-k8s-scaling

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The native Kubernetes executor pages say to run one executor per deployment and never add replicas, and that the executor clones repositories into a shared workspace. Both date from the removed multi-pod job mode. Today:

  • executors dequeue with SKIP LOCKED
  • each executor process has a unique name
  • each job gets its own pod and workspace volume

So several executor pods can serve the same queues.

Solution

deploy-executors-kubernetes.mdx:

  • Rewrite "How it works": the job pod clones its own workspace.
  • Add the secrets permission to the RBAC table.
  • Rewrite "Scale and schedule jobs" to cover:
    • replicas and maximumNumJobs
    • the Kubernetes API client limit
    • job resource and ephemeral-storage requests
    • the Kubernetes limits on job pods, each with the event or error it shows, as hit on an EKS test cluster: maxPods, pod IP addresses (VPC CNI), requests, image pulls, API Priority and Fairness, ResourceQuota with the Job controller's retry delay, and the restricted Pod Security Standard
    • an example Helm override for all the new inputs, as plain YAML (rendered with the Remove self-hosted analytics language #1029 chart and checked)

executors-config.mdx:

  • Add EXECUTOR_KUBERNETES_CLIENT_QPS / _BURST and EXECUTOR_KUBERNETES_RESOURCE_{REQUEST,LIMIT}_EPHEMERAL_STORAGE.
  • Add KUBERNETES_EXECUTOR_POD_SECURITY_CONTEXT and KUBERNETES_EXECUTOR_CONTAINER_SECURITY_CONTEXT, which the executor already reads.
  • Remove EXECUTOR_KUBERNETES_PERSISTENCE_VOLUME_NAME.

Merge timing

This documents behavior from unreleased PRs. Merge it after they ship:

Amp threads

…nd nodes

The page said to run one executor per deployment and never add
replicas, and that the executor clones repositories into a shared
workspace; both date from the removed multi-pod job mode. Describe how
job pods clone their own workspace, add the Secret permission, explain
scaling with replicas, the Kubernetes API client limit, and job
ephemeral-storage requests, and list the Kubernetes settings that cap job
pods per node. Add the new executor settings to the configuration
reference and remove EXECUTOR_KUBERNETES_PERSISTENCE_VOLUME_NAME.

Amp-Thread-ID: https://ampcode.com/threads/T-01a20ade-0ba8-7364-b673-ac2197c102c9
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Nov 24, 2026 8:58pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
Page Before After Diff
/self-hosted/executors/deploy-executors-kubernetes prod preview −3 +58
/self-hosted/executors/executors-config prod preview −1 +6

…pods

On the EKS test cluster, a ResourceQuota held job pods back with
'exceeded quota' while their jobs kept executor slots, and a namespace
enforcing the restricted Pod Security Standard rejected the executor and
job pods until they set security contexts. Also documents the two job
security context variables the executor already reads.

Amp-Thread-ID: https://ampcode.com/threads/T-01a20ade-0ba8-7364-b673-ac2197c102c9
Co-authored-by: Amp <amp@ampcode.com>

This branch was successfully deployed

1 active deployment
Preview — fdbb61e5 Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant