Skip to content

Kubernetes Containerization for User Code Editor Sessions #3

@ekas-7

Description

@ekas-7

Description

Implement Kubernetes-based containerization in DevMux so that every user (or session) gets their own isolated container with a dedicated file structure. This ensures that code editing, execution, and file management are sandboxed per user, similar to how Gitpod or Codespaces work.


Expected Behavior

  • A new Kubernetes Pod is created when a user starts a session.
  • Each Pod has its own file system (via PVC or ephemeral volume).
  • User’s code editor (Monaco/VS Code server) interacts directly with their container.
  • Pods can be cleaned up automatically when sessions end or time out.

Current Behavior

Currently, all users share the same runtime environment, meaning:

  • No per-user isolation.
  • Possible file conflicts.
  • Harder to scale or apply resource limits.

Steps to Reproduce (for bugs)

  1. Open DevMux with multiple users.
  2. Edit or run code simultaneously.
  3. Notice that the environment and file structure are shared across users.

Possible Solution

  • Use Kubernetes Pods to launch a container per user/session.
  • Mount per-user Persistent Volume Claims (PVCs) for file storage.
  • Add TTL or cleanup jobs for terminating idle sessions.
  • Implement a backend controller in DevMux to interact with the Kubernetes API (create/delete Pods).
  • Proxy frontend connections to the correct container.

Additional Context

  • Could leverage codercom/code-server or a custom image with DevMux dependencies.
  • Important for multi-user scalability, sandboxing, and security.
  • Helps build towards a Gitpod-like environment within DevMux.

Contribution

  • I am willing to work on this issue
  • Help wanted

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions