Stop a workspace from the command line

Stop a workspace from the command line by setting the spec.started field in the DevWorkspace custom resource to false. .Prerequisites

About this task

Procedure

Run the following command to stop a workspace:
$ oc patch devworkspace <workspace_name> \
-p '{"spec":{"started":false}}' \
--type=merge -n <user_namespace> && \
oc wait --for=jsonpath='{.status.phase}'=Stopped \
dw/<workspace_name> -n <user_namespace>