Configure Dev Spaces

Create the CheCluster

The CheCluster custom resource is the single configuration object for your Dev Spaces deployment. Apply the following to create an instance with sensible defaults for a workshop environment:

apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
  name: devspaces
  namespace: openshift-devspaces
spec:
  components:
    cheServer:
      debug: false
      logLevel: INFO
    dashboard: {}
    devWorkspace: {}
    devfileRegistry: {}
    imagePuller:
      enable: false (1)
    metrics:
      enable: true
    pluginRegistry:
      openVSXURL: "https://open-vsx.org" (2)
  containerRegistry: {}
  devEnvironments:
    startTimeoutSeconds: 600
    secondsOfRunBeforeIdling: -1 (3)
    secondsOfInactivityBeforeIdling: 1800
    maxNumberOfWorkspacesPerUser: 5
    maxNumberOfRunningWorkspacesPerUser: 2
    defaultContainerResources:
      limits:
        cpu: "2"
        memory: 6Gi
      requests:
        cpu: 500m
        memory: 1Gi
    disableContainerRunCapabilities: false (4)
    defaultEditor: che-incubator/che-code/latest
    defaultNamespace:
      autoProvision: true
      template: <username>-devspaces
    storage:
      pvcStrategy: per-workspace (5)
  networking:
    auth:
      gateway:
        configLabels:
          app: che
          component: che-gateway-config
1 Image puller pre-caches images on nodes to speed up workspace startup. Disable for small clusters; enable if startup time matters.
2 Points at the public Open VSX registry so developers can install any extension. The default embedded registry has a very limited set.
3 Set to -1 to disable run-time idling (useful during workshops). In production, set a reasonable value.
4 Required for nested containers (Podman-in-workspace). Must be false.
5 per-workspace gives each workspace its own PVC. This supports multiple workspaces per user without conflicts and provides clean isolation. Alternative: per-user shares a single PVC across all workspaces.

Apply it:

oc apply -f checluster.yaml

Wait for the deployment to complete:

oc get checluster/devspaces -n openshift-devspaces -o jsonpath='{.status.chePhase}'

The output should be Active. You can also watch the pods come up:

oc get pods -n openshift-devspaces -w

Useful Configuration Commands

Patch any CheCluster setting without re-applying the full YAML:

# Change storage strategy
oc patch checluster/devspaces -n openshift-devspaces \
  --type='merge' \
  -p '{"spec":{"devEnvironments":{"storage":{"pvcStrategy":"per-workspace"}}}}'

# Change max workspaces per user
oc patch checluster/devspaces -n openshift-devspaces \
  --type='merge' \
  -p '{"spec":{"devEnvironments":{"maxNumberOfWorkspacesPerUser":10}}}'

# Read a specific setting
oc get checluster/devspaces -n openshift-devspaces \
  -o jsonpath='{.spec.devEnvironments.storage.pvcStrategy}'
Do not run these today. Just consider them a reference.

Access the Dashboard

Once the CheCluster is Active, get the dashboard URL:

oc get checluster/devspaces -n openshift-devspaces \
  -o jsonpath='{.status.cheURL}'

Open this URL in your browser. You will authenticate through OpenShift OAuth — users log in with whatever identity provider is configured on the cluster.

Next Steps