How to get such a Kubernetes dev platform

I believe it is possible to already get such an efficient k8s development platform. Since I am a co-founder of DevSpace, a company that provides the components for such a platform, I will explain how we recommend setting it up. What you essentially need are three things: A Kubernetes cluster for your developers, DevSpace Cloud and DevSpace, the open-source CLI tool.

Goal 1: Developers can directly access k8s without contacting operations/cluster managers

At first, you need to set up a Kubernetes cluster. The easiest way to do this is to use a public cloud provider that offers managed Kubernetes. All major cloud providers, such as Google Cloud, Amazon Web Services, Microsoft Azure or Alibaba Cloud, and an increasing number of small providers offer such a service. Alternatively, you can set up a Kubernetes cluster in a private cloud, which requires a bit more effort but should not be a big challenge if you already have another cluster running for your production system.

After you have a cluster, you need to give your developers access to it. ( Refer to my other post for different methods to give developers access to Kubernetes.) To create a real developer platform, you need to connect it to DevSpace Cloud. This can be simply done by running the command devspace connect cluster (you need to install DevSpace on your computer first). DevSpace Cloud then transforms your cluster into a developer platform and thus solves the issue of giving your developers access to k8s because you now can invite users to your cluster via the DevSpace UI and set limits for the individual users, e.g. regarding the allowed computing power. As long as the users stay within these limits, they can create isolated Kubernetes namespaces on demand without having to interact with the cluster manager.

The DevSpace Cloud Workflow

Goal 2: Developers can get started easily and do not have to adapt their workflows

To enable developers to seamlessly work with Kubernetes, we recommend installing DevSpace, an open-source CLI tool that works independently of DevSpace Cloud. Then, you need to define the necessary configurations in the devspace.yaml. This configuration file will be automatically created once you run the command devspace init and gives you a good starting point. However, you usually will have to make some adaptions to fully reflect your desired workflow. Optimally, someone in your team who has some Kubernetes expertise is responsible for this task. In the devspace.yaml, you can determine many different settings, e.g. how the application should be deployed for development, staging, and production, which dependencies exist and which ports should be used.

After this initial setup, the configuration file can be shared with the rest of the team using normal git versioning. For the average developer, it is then possible to just use the optimized configuration file and work as normally not caring about Kubernetes. While the developed software is executed in the Kubernetes cluster, developers can continue to use their local IDEs and debuggers. (For more information about this form of cloud development and why it could be the future, read my other article here.) Developers simply need to run devspace dev which starts the application in Kubernetes and makes it accessible on localhost via port forwarding. DevSpace then automatically syncs the locally written code into the containers and even allows developers to execute commands directly in the containers. All of this ensures that the development in Kubernetes is as similar to local development as possible.

We recently added a local UI for DevSpace to further improve the developer experience and to make it easier to understand what is happening in Kubernetes during development.

The DevSpace Localhost UI

Goal 3: Developers can easily deploy to Kubernetes