
With Openshift Dev Spaces, developers can create a simplified workspace that streamlines their development experience. This feature is built on top of Kubernetes.
Developers can create a new Dev Space in just a few clicks, with a pre-configured environment that includes everything they need to start coding. This environment is managed by the platform, so developers don't have to worry about setting up or maintaining it.
Each Dev Space is a self-contained environment that includes a pre-configured IDE, code editor, or terminal, along with the necessary tools and dependencies for the project. This allows developers to focus on writing code without the hassle of setting up their environment.
Developers can easily switch between different Dev Spaces, each with its own unique environment and configuration. This makes it easy to work on multiple projects simultaneously, without having to worry about conflicts or compatibility issues.
Kubernetes and Cluster Management
Kubernetes and Cluster Management is a crucial part of OpenShift Dev Spaces. It's a container orchestration system that automates the deployment, scaling, and management of containerized applications.

Kubernetes was originally designed by Google, and its name comes from the Greek word for "helmsman" or "pilot". Kubernetes provides a single interface for managing multiple clusters, making it easier to deploy and manage applications across different environments.
With Kubernetes, you can define the desired state of your application and the system will automatically manage the underlying infrastructure to achieve that state. This includes rolling updates, self-healing, and resource management.
Kubernetes is highly extensible and can be integrated with various tools and services to enhance its functionality. In the context of OpenShift Dev Spaces, Kubernetes provides a robust and scalable platform for building, deploying, and managing applications.
OpenShift Dev Spaces uses Kubernetes to manage the underlying infrastructure, allowing developers to focus on writing code rather than managing infrastructure. This enables faster development cycles and improved collaboration among team members.
Recommended read: Openshift vs Kubernetes
Configuration and Setup
To get started with OpenShift Dev Spaces, you'll need to install the Dev Spaces CLI. This can be done using the default package manager for your operating system.

The Dev Spaces CLI is available for Linux, macOS, and Windows, and can be installed using a simple command. For example, on Linux, you can use the following command: `sudo snap install devspaces --classic`.
Once the CLI is installed, you can log in to your OpenShift cluster using the `devspaces login` command. This will prompt you to enter your OpenShift username and password.
Consider reading: Openshift Command Line
Cloud Environment Service
Red Hat OpenShift Dev Spaces is built on the open source Eclipse Che project.
It uses Kubernetes and containers to provide a consistent, secure, and zero-configuration development environment.
Developers and IT team members can enjoy a fast and familiar experience, similar to an integrated development environment (IDE) on their laptop.
OpenShift Dev Spaces is included with your OpenShift subscription and is available in the OperatorHub.
It gives development teams a faster and more reliable foundation on which to work, and offers operations teams centralized control and peace of mind.
Applying Resources
Applying resources to your application is a crucial step in Dev Spaces.
By default, the oc and kubectl commands target the cluster running Dev Spaces. If you want to apply resources to another cluster, you need to log in with oc or kubectl and pass a different --context.
You can apply policies to a running app using kubectl or oc. This is a straightforward process that involves specifying the resources you want to apply.
To apply resources as part of Dev Spaces, you'll need to use kubectl or oc commands. If Dev Spaces is running on a cluster with Kuadrant installed, you can apply resources using the following command:
- kubectl or oc command with the specified --context
Cluster Installation
To get started with OpenShift Dev Spaces, you'll need to install it on an OpenShift cluster. This involves navigating to the Operator Hub and searching for Red Hat OpenShift Dev Spaces.
First, log into the OpenShift console from your browser and navigate to the Operator Hub. Type "dev spaces" into the search bar and select Red Hat OpenShift Dev Spaces. Click "Install" and then "Install again" to begin the installation process.
The Operator should start installing and you can observe the installed Operators by clicking on "Installed Operators" in the left navigation menu bar.
To complete the installation, open a terminal and log into your OpenShift cluster with the CLI. Create an instance of Dev Spaces in your cluster by following the prompts.
Once the Dev Spaces cluster is complete, you can verify the rollout by selecting "Workloads" and then "Pods" from the left navigation menu. Select the "openshift-devspaces" project from the dropdown menu to view the running pods.
After installation, you'll need to install additional tools like Butane, which is used to create MachineConfigs. You can install Butane by following the link provided in the documentation.
To use Butane, open a shell terminal and log into your OpenShift cluster as a Cluster Administrator with the oc CLI. Set a variable for the OpenShift Node role that you'll be applying changes to, based on your cluster configuration.
A unique perspective: Open Source Openshift
Prerequisites
Before you start configuring and setting up your Dev Spaces instance, make sure you have access to one of the following options.
You must have access to a self-hosted OpenShift Dev Spaces instance to proceed with the setup.
To get started, you'll also need an OpenShift Dev Spaces instance provided by the Red Hat Developer Sandbox.
Here are the specific options you can choose from:
- A self-hosted OpenShift Dev Spaces instance.
- An OpenShift Dev Spaces instance provided by the Red Hat Developer Sandbox.
Configuring VS Code
To configure VS Code, you need to install kuadrantctl in your workspace to demonstrate Kubernetes resource generation from your modified OpenAPI definition. This is a crucial step in the setup process.
Optional, but recommended, is to configure Git with your username and email to enable pushing changes back to your repository. This will help you keep track of your code and collaborate with others.
To access the terminal in VS Code, select the Terminal menu and choose New Terminal. From there, you can run the necessary commands to complete the setup.
Here are the commands you need to run in the terminal:
- Install kuadrantctl in your workspace
- Optional: Configure Git with your username and email
Install Kuadrantctl CLI
To install kuadrantctl in your Dev Spaces workspace, enter the following command.
This command installs kuadrantctl in /home/user/.local/bin, which is included in the container's $PATH by default.
You'll need to run this command to get kuadrantctl up and running.
The /home/user/.local/bin directory is where the kuadrantctl CLI will be installed.
Take a look at this: Openshift Local
Specifying HTTP Routes
You can link your routes to your paths by adding an x-kuadrant extension with backendRefs.
The x-kuadrant extension at the path level applies to all HTTP methods defined in the path.
To specify method-specific policies, move the extension inside the relevant HTTP method block, such as get or post.
This approach allows you to define different policies for different HTTP methods.
Frequently Asked Questions
What is a dev space?
A dev space is a customized development environment with pre-installed tools and runtimes for building and deploying applications. It's your one-stop-shop for developing and testing your business solution
Sources
- https://developers.redhat.com/products/openshift-dev-spaces/overview
- https://www.opensourcerers.org/2023/10/16/eclipse-che-openshift-dev-spaces-podman-with-fuse-overlay/
- https://ansible.readthedocs.io/projects/dev-tools/devspaces/
- https://redhat-scholars.github.io/inner-loop-guide/inner-loop/6.2/developer-workspace.html
- https://docs.kuadrant.io/0.11.0/kuadrantctl/doc/openapi-openshift-dev-spaces/
Featured Images: pexels.com