Skip to content

[Feature]: Kubernetes: configurable jump pod image (proxy_jump.image) #4508

Open

Description

@andweng

Problem

The Kubernetes backend always runs the SSH jump pod from a hard-coded image, testcontainers/sshd:1.3.0@sha256:c50c0f59… (JUMP_POD_IMAGE in core/backends/kubernetes/compute.py). There's no way to choose another one.

Some clusters can't run that image:

  • Image policy. Admission policies or registry rules often allow only images from an internal registry, or images built on an approved base. On such clusters the jump pod can't start, so no run can be provisioned.
  • Vulnerability gates. testcontainers/sshd:1.3.0 is Alpine with OpenSSL 3.3.3. Grype 0.121 finds 12 critical and 45 high vulnerabilities in it with fixes available (for example CVE-2025-15467 and CVE-2025-9230 in libcrypto3).
  • Crypto policy. Every SSH session to a job, from dstack attach and from IDEs, terminates on the jump pod first. Environments that require FIPS-validated crypto, or a fixed SSH cipher and MAC list, need an sshd they control.

Solution

Add proxy_jump.image, next to the existing cpu, memory, node_selector and tolerations, defaulting to the current image:

projects:
- name: main
  backends:
  - type: kubernetes
    kubeconfig:
      filename: ~/.kube/config
    contexts:
    - name: gpu-cluster-a
      proxy_jump:
        image: registry.example.com/sshd:1.0@sha256:...

The contract for the image follows from _get_jump_pod_commands(): OpenSSH sshd at /usr/sbin/sshd, run as root, plus /bin/sh and ssh-keygen (for ssh-keygen -A). It would be documented next to the other proxy_jump options. I have a PR ready, following #4451 and #4459.

Workaround

Patching JUMP_POD_IMAGE in the installed package on the server. We're doing that on 0.22.6 with an Ubuntu 24.04 image that runs a FIPS-validated OpenSSH, and dstack attach and SSH work through it.

Would you like to help us implement this feature by sending a PR?

Yes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions