Opens in a new tab
vmblog logo 2024 wht (updated)

Host development environments on Kubernetes too

Share: 

David Marshall | Published: October 16, 2024

Intro

The conventional development environment is hosted almost entirely on the developer’s workstation. There’s the IDE, build tools, source code, package management, build artifacts, and specialized hardware like GPUs. Typically there are also cloud services like repos and CI/CD.

Coder-Article-image1

In a small team, this works well enough. But enterprise development organizations constantly push against the limits of conventional development environments with growing teams and expanding project scopes:

  • Developer experience suffers as technical onboarding and build times take longer.
  • Hardware costs rise when workstations need refreshing to handle increasing project complexity.
  • Development slows down with the greater risk of irreproducible bugs, a.k.a. “works on my machine”.
  • Platform engineering effort increases to handle more spinning plates, which robs resources from investing in infrastructure improvements.

A common solution to these problems is migration to virtual desktop infrastructure (VDI). But this gives only short-term gains. Cloud costs for always-on compute, block storage, and workstation licensing are expensive. And the IDE, the center of the developer’s experience, is now remote, which adds UI latency and limits customizability.

The platform team already deploys applications to the cloud for scalability, availability, and reproducibility. It would be great if developers themselves could get the same benefits for their environments. This is where a cloud development environment (CDE) platform comes in.

A CDE uses cloud technologies and principles to ease the burden on developers, platform teams, and the enterprise.

Lift and shift with a CDE

The idea is simple enough: a CDE deploys development environments in the cloud. The goal is to take advantage of the cloud’s strengths while maintaining the developer experience.

CDEs use the “lift and shift” paradigm.

Coder-Article-image2 

The IDE still lives on the local workstation, so developers keep the experience they’re used to. The rest of the environment runs in the cloud. This rearrangement gives the enterprise the levers to more easily manage software development infrastructure:

  • Developer experience: The same customizable and powerful local experience, even on modest workstation hardware.
  • Developer productivity: Faster technical onboarding, faster build times.
  • Consolidated infrastructure: Manage and monitor development environments from a single place.
  • Enterprise spending decreases: Less frequent hardware refreshes and lower cloud spend.

Consistent, repeatable, but customizable, development environments

The CDE’s biggest advantage over conventional setups is providing repeatable, consistent dev environments. The platform team specifies a dev environment’s components, their configuration, and their interactions in a single template. At the literal click of a button, each developer gets an independent, fully functioning dev environment that exactly matches the template’s specifications.

The CDE spins up and tears down environments on demand, which gives a threefold benefit:

  • Technical onboarding shortened to minutes: The developer doesn’t have to follow intricate steps to set up their workstations.
  • No more resource contention: The developer gets the necessary resources when the workspace starts.
  • Efficient resource usage: Dormancy thresholds ensure that an unused workspace isn’t running up charges while the developer is away from the keyboard.

Consistency doesn’t mean inflexibility. Since the IDE runs locally, the developer can still customize their local experience. And the CDE allows the developer to customize the rest of the environment, but with guardrails. The platform team specifies the permitted customizations and their parameters in the template. For example, a template can prompt the developer for the number of GPU cores to provision for a new workspace.

Combining a CDE with Kubernetes

Deploying a CDE on Kubernetes increases the enterprise’s leverage even more. Kubernetes automates the tricky parts of application deployment, giving platform teams a single place to scale, improve availability and resource efficiency, and monitor the dev infrastructure’s deployment and execution. A platform team that already deploys other applications on Kubernetes gets the added benefit of reusing existing expertise.

Enterprise-level availability

A CDE platform is inherently cloud-friendly. Its modularity and flexibility make it straightforward to deploy on Kubernetes. The platform team just uses existing Kubernetes features to meet their availability requirements:

  • Spin up multiple instances of the CDE control plane with a load-balancer.
  • Self-healing features ensure that the CDE control plane and workspaces are always available.

Enterprise-level scalability

Kubernetes lets the platform team scale the entire development infrastructure. This is useful for reducing latency, accommodating regional differences like regulatory conformance, or aligning with the enterprise’s organizational structure.

For example, think of a platform team in the eastern U.S.A. where most of the enterprise’s developers are located. As a pilot project, it sets up a Kubernetes cluster for the CDE’s control plane, its related services, and the developer workspaces. With this infrastructure deployed, tested, and refined, the platform team can deploy workspace nodes in other regions.

Coder-Article-image3

 

Enterprise-level security

For security, the CDE and Kubernetes play complementary roles. With tools from both platforms, the platform team can flexibly harden the development infrastructure. Kubernetes provides ingress/egress control, TLS termination, network policies, its Secret API, and audit logging.

An enterprise-grade CDE has its own security features. These typically include encrypting connections between environment components, access controls for workspaces and administrative tools, quotas, and audit logging. Also, an application built from consistently-deployed dev environments is less likely to have supply chain-related defects, an outcome of avoiding “works on my machine”. 

Extremely security-minded organizations-government agencies and highly regulated industries for example-may deploy an air-gapped dev environment. As well as the dev environment itself, the platform team must host developer services, like repositories, registries, identity providers, and CI/CD, in-house instead of connecting to external services. These types of organizations are already managing offline systems, so an offline CDE is typically just another system deployed with Kubernetes.

Conclusion

A CDE gives developers consistency while maintaining dev experience, lets platform engineering teams consolidate dev environment management, and reduces costs for large development organizations. Deploying a CDE on Kubernetes adds enterprise-level scalability and availability. An enterprise that already uses Kubernetes to deploy applications can leverage existing expertise and resources to get the cloud’s advantages for dev environments too.

 

To learn more about Kubernetes and the cloud native ecosystem, join us at KubeCon + CloudNativeCon North America, in Salt Lake City, Utah, on November 12-15, 2024.

##

ABOUT THE AUTHOR

Rob Whiteley, CEO at Coder

Rob Whiteley 

Rob Whiteley serves as CEO of Coder. Previously he was GM of NGINX. He has led marketing, product, and analyst teams for companies like Hedvig, Riverbed, and Forrester. Rob uses his experience working with enterprise IT and DevOps customers to deliver thought leadership and drive demand for modern IT infrastructure solutions.