DevPod remote dev environments
Use DevPod + devcontainer.json to spin up standardized containerized dev environments on VKS
Background
LLM-era workloads outgrow local machines fast. "Edit locally, build/run remotely" is becoming the default, and DevPod is one of the more interesting tools for that.
What is DevPod?
DevPod creates container-based dev environments via a devcontainer.json file. The same configuration can drive Docker locally, a remote server, or a cloud provider — uniform environments across teams.
DevPod core components
devcontainer.json
Drop .devcontainer/devcontainer.json into your project. Common fields:
| Field | Type | Description |
|---|---|---|
image | string | Base image for the dev environment |
customizations | object | Tool / service config — see the support matrix |
portsAttributes | object | Forwarded ports and their attributes |
postCreateCommand | string | array | object | Command(s) run after the container starts |
features | object | Extra packages — see features list |
Example:
{
"name": "Python 3",
"image": "registry.hd-01.alayanew.com:8443/public/mcr.microsoft.com/devcontainers/python:1-3.12",
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"streetsidesoftware.code-spell-checker"
]
}
},
"portsAttributes": {
"9000": {
"label": "Hello Remote World",
"onAutoForward": "notify"
}
},
"postCreateCommand": "pip3 install -r requirements.txt"
}Workspace
A containerized dev environment containing your source and dependencies.
Providers
CLI plugins that create / manage / run Workspaces on different platforms (Docker, Kubernetes, AWS, Azure, …). Configured via provider.yaml.
Use DevPod + VS Code remotely
DevPod has a CLI and a desktop client. This tutorial uses the CLI. Install per the official guide and verify with devpod version.
Preparation
Download the example archive:
| File | Description |
|---|---|
provider.yaml | Kubernetes Provider config |
pod-manifest-tmpl.yaml | Pod template for the Workspace |
remote-container-env | Extra environment variables |
Create the Provider
devpod provider add --name kubernetes ./provider.yamlSet its parameters:
# kubeconfig path
devpod provider set-options -o KUBERNETES_CONFIG=$(pwd)/kubeconfig
# StorageClass for the Workspace's source code
devpod provider set-options -o STORAGE_CLASS=<STORAGE_CLASS_NAME>
# Namespace for the Workspace
devpod provider set-options -o KUBERNETES_NAMESPACE=devpod
# Pod manifest template
devpod provider set-options -o POD_MANIFEST_TEMPLATE=$(pwd)/pod-manifest-tmpl.yaml
# Extra env vars
devpod provider set-options -o ENV_FILE=$(pwd)/remote-container-env
# Resource limits
devpod provider set-options -o RESOURCES="limits.cpu=18,limits.memory=200G,limits.nvidia.com/gpu-h800=1,requests.cpu=18,requests.memory=200G,requests.nvidia.com/gpu-h800=1"Verify:
devpod provider options kubernetesStart the Workspace
devpod up --provider kubernetes github.com/microsoft/vscode-remote-try-python \
--workspace-env-file ./remote-container-env \
--devcontainer-image registry.hd-01.alayanew.com:8443/public/mcr.microsoft.com/devcontainers/python:1-3.12 \
--ide vscode \
--debugFlags:
github.com/microsoft/vscode-remote-try-python— project to clone--workspace-env-file— extra env-var file--devcontainer-image— overrides the image indevcontainer.json--ide— pick the IDE (vscode here)--debug— verbose logs
VS Code opens automatically and attaches to the DevPod container. Add ports in the VS Code "PORTS" panel to expose services.
Tip: Workspace startup pulls source and bootstraps the DevPod agent — give it a moment.
Reopen the Workspace
devpod up <WORKSPACE_NAME> --ide vscodeLast updated on
