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,
dzworkspacekubeconfig.--update-kubeconfig
Then run commands like
kubectlgetpods
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.
Here's a video covering how you can access and deploy apps to your workspace's Kubernetes cluster...
Tutorial Steps
Create a recipe that you can use at devzero.io/dashboard/recipes/new (give it any name and leave everything else blank and click Create a recipe).
Use the following recipe, then Save and Build and then Publish once the build completes successfully (it uses Google Cloud Platform's microservices-demo repo).
Build a workspace from the recipe, and run the following in your terminal:
dzworkspaceconnect<workspace-name>
Run the following steps inside the SSH session that's connected to your workspace:
dzworkspacekubeconfig.--update-kubeconfig# will ask to loginkubectlgetpods# verification cd/home/devzero/microservices-demoskaffoldrun--default-repottl.sh# this will take a bit of time since its building multiple docker images (~5mins)kubectlport-forward--address0.0.0.0deployment/frontend8088:8080
Verify that all the pods are running:
kubectlgetpods
Visit, <workspace-name>:8088 in your browser to see the running frontend!