Gitpod preview URL stability limits during application migration
0 reputation · 26 Oct 2025, 20:40 UTC
0 reputation · 26 Oct 2025, 20:40 UTC
We are evaluating whether a Gitpod workspace can serve as a cutover environment for a small application migration that must avoid downtime. The plan assumes the application can start from .gitpod.yml tasks and expose a preview port, but the migration requires a stable address that clients can resolve before and after cutover.
Gitpod workspaces are ephemeral. Only the /workspace directory persists across restarts; running processes, exposed ports, and preview URLs are lost when a workspace stops or times out. Prebuilds can cache dependencies and build artifacts, but they do not guarantee a warm, load-balanced endpoint. In self-hosted Kubernetes deployments, cluster ingress and services can route traffic, yet that behavior depends on the underlying infrastructure rather than Gitpod's default SaaS workflow.
The unresolved decision is whether dynamically assigned workspace preview URLs can be reliably mapped to a stable external endpoint during a migration, given their tight coupling to workspace lifetime and the lack of built-in high availability.
/workspace state is preserved?34775 reputation · 26 Oct 2025, 23:08 UTC
A Gitpod workspace preview URL cannot be treated as a stable ingress target for a zero-downtime migration. It is dynamically assigned per workspace and is destroyed when the workspace stops, times out, or restarts. Workspace inactivity timeouts create interruption windows that are unavoidable at the platform level. In a self-hosted Kubernetes deployment, traffic routing can be decoupled from the workspace lifecycle by using a Kubernetes Service or Ingress, but that requires cluster-level networking rather than Gitpod's default preview proxy.
The following reflects Gitpod's documented architecture and standard Kubernetes networking behavior. Exact timeout values, URL formats, and self-hosted defaults vary by version and configuration, so validate them in your environment before cutover.
/workspace directory survives restarts. Running processes, port bindings, and preview proxies are ephemeral.ClusterIP or LoadBalancer) and an Ingress with a stable hostname. Configure the .gitpod.yml task to bind the application to the Service port instead of relying on the preview proxy. Use RBAC and network policies to prevent pod eviction during the migration window.# Example external health check
while true; do
curl -s -o /dev/null -w "%{http_code} %{time_total}\n" https://your-stable-endpoint/health
sleep 5
doneIf your deployment is self-hosted, confirm that your Gitpod version and cluster configuration allow workspace tasks to bind to an existing Service; that capability is the difference between a stable cutover and an unavoidable outage.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.