Workspace Cluster

User workspaces are deploying with an ephemeral, namespaced Kubernetes cluster. If you need to interact with this cluster...

If you prefer video from, click here for a 5min video!

From Anywhere

To view the config, run

dz workspace kubeconfig <workspace-name>

# to get the workspace name
dz workspace ls

To write the config to the default Kubernetes configuration location, run

dz workspace kubeconfig <workspace-name> --update-kubeconfig

Then run commands like

kubectl get pods

From Inside a DevBox

When inside a DevBox context (i.e. when connected to a workspace), the CLI is able to retrieve environmental information from /etc/devzero. It is possible to replace the <workspace-name> with .. For example,

dz workspace kubeconfig . --update-kubeconfig

Then run commands like

kubectl get pods

DevZero reserves the default namespace for it's managed deployments. Do not operate on this namespace. Adding or removing resources in this namespace will lead to undocumented behaviors and cause potential data loss.

dz workspace kubeconfig -h 
This kubeconfig can be used by any kubectl to interact with the virtual cluster backing a workspace.
Usage: kubectl --kubeconfig <(dz ws kubeconfig <workspace_id | workspace_name>) ...

  dz workspace kubeconfig <workspace_id | workspace_name> [flags]

  kubeconfig, kc

  -h, --help                help for kubeconfig
  -u, --update-kubeconfig   update local kubeconfig (default: $HOME/.kube/config)

Global Flags:
      --verbose   Get detailed output

Tutorial Video

Here's a video covering how you can access and deploy apps to your workspace's Kubernetes cluster...

Last updated