Examining Your Kubernetes Cluster with Lens

This documentation is for Dash Enterprise.
Dash Enterprise is the fastest way to write & deploy Dash apps and
Jupyter notebooks.
10% of the Fortune 500 uses Dash Enterprise to productionize AI and
data science apps. Find out if your company is using Dash Enterprise.

Lens is a free, open-source tool that offers a graphical user interface for inspecting Kubernetes clusters. Using Lens is an alternative to running kubectl
commands against your cluster. We recommend using Lens primarily to examine the status of resources in your cluster—the equivalent
of running kubectl get commands.

Support bundles can also provide information about the health of the system.
The analysis displayed when you generate a support bundle is determined by Plotly-made analyzers and is specific to
the state of the cluster at the moment you generated it, as are the contents of the support bundle itself,
whereas Lens displays a real-time view of the Kubernetes objects
in your cluster. You don’t need to be experienced with Kubernetes objects to follow the steps in this guide.

Warning: When you select a Kubernetes object in Lens, the Lens interface displays Edit and Delete buttons. Do not edit or delete
anything in the cluster unless instructed by our customer success team. Making changes to Kubernetes objects in Lens could cause discrepancies
between the resources on the cluster and what is displayed in the Dash Enterprise App Manager, among other potential issues.

Getting Started

Lens is available as a desktop app for Windows, Mac, and Linux. Download it from https://k8slens.dev/.

Note: If using a recent version of Lens, you may need to create a Lens ID, which requires an internet connection. Once your ID is
created and you are logged in, you can use Lens even if your workstation does not have internet access.

When you add your Kubernetes cluster to your kubeconfig,
Lens automatically detects your access and adds the cluster to your Lens Catalog.
The Catalog is a list of clusters that you can examine using Lens. The first time you open Lens, you
are prompted to go to the Catalog. Select Browse Clusters in Catalog to view the list of clusters.

<img>

Select the Kubernetes cluster that Dash Enterprise is installed on to get started. You can also add it to the hotbar for quick access.

<img>

Inspecting Dash Enterprise

Checking the Health of the Core System

We use core system to refer to the Dash Enterprise components that exclude user-created resources like apps.
We recommend checking the health of the core system after a new installation or upgrade.

The best way to get an overview of core system health is to check the status of the appstack and buildstack. Appstack represents the Dash Enterprise web app
(referred to as the App Manager in documentation for developers), and buildstack represents the set of tools Dash Enterprise uses to build apps and
workspaces.

To check the health of the core system in Lens:

  1. Under Custom Resources, expand dash.plotly.com; then select DashEnterprise.

<img>

  1. In the Namespace list, select plotly-system.

<img>

The status for Appstack and Buildstack is displayed.

<img>

Tip: This information is also available via the kubectl get dashenterprise -n plotly-system command.

If both are healthy, this indicates that your Dash Enterprise instance is running normally.

A provisioning status indicates that the appstack or buildstack is in the process of provisioning what it needs to be in a healthy state.

A pending status indicates that the appstack or buildstack is waiting for another resource before it can change to a provisioning
or healthy state.

You can view the status of the individual components that make up the appstack and buildstack by selecting Appstack or Buildstack
from the dash.plotly.com custom resource group.

<img>

 

<img>

 

<img>

Viewing Logs

To view various logs in Lens, you’ll be interacting with pods, which are small, sometimes short-lived Kubernetes objects that represent a set of containers. Resources created from the
Dash Enterprise App Manager, like apps, run inside these containers. By finding the pod corresponding to the resource whose logs you want to view,
you can view the resource’s logs.

Viewing App Build Logs

Pods that are responsible for app builds are cleaned up when the build finishes, so their logs are only available in Lens for as long as the build is in progress.
If you want to view build logs after a build has completed, view them in Dash Enterprise. From your app’s Info, go to the Builds tab and select Show Build Logs
for the build you want to view.

Known issue: We are aware of an issue where build logs in Dash Enterprise are sometimes incomplete, slow, or out of order.

To view an app’s build logs in Lens:

  1. Under Workloads, select Pods.
  2. In the Namespace list, select plotly-system.

<img>

  1. Find the pod you want to view and select it. These pod names use the format &lt;app-name&gt;-&lt;ID&gt;-build-1-build-pod, so if
    you want to view build logs for an app named “clinical-trial”, the pod name would look like “clinical-trial-766cab8a-2r4r6-build-1-build-pod”.
    A reliable way to find the pod quickly is to start typing the name of the app in the search bar.
  2. In the pane that opens, select Pod Logs <img>.
  3. In the Container list, select build.

<img>

Viewing App Runtime Logs

When Dash developers restart or deploy a new version of an app, the system cleans up the pods responsible for running past versions. This means that
app logs in Lens are only available for the latest app version. If you want to see logs that span multiple versions of an app,
view app logs in Dash Enterprise.

To view an app’s runtime logs in Lens:

  1. Under Workloads, select Pods.
  2. In the Namespace list, select dash-apps.

<img>

  1. Find the pod for the app process you want to view and select it. These pod names use the format &lt;app-name&gt;-----&lt;process&gt;-&lt;ID&gt;, so if
    you want to view the web process logs for an app named “clinical-trial”, the pod name would look like “clinical-trial-----web-74c9899dc6-8tfcd”.
    A reliable way to find the pod quickly is to start typing the name of the app in the search bar.
  2. In the pane that opens, select Pod Logs <img>.

Viewing Workspace Build Logs

Workspace build logs correspond to the logs available to app owners and co-owners in the Workspace tab of the App Info in Dash Enterprise.

To view workspace build logs in Lens:

  1. Under Workloads, select Pods.
  2. In the Namespace list, select dash-apps.

<img>

  1. Find the pod for the workspace whose logs you want to view and select it. These pod names use the format workspace-&lt;app-name&gt;-&lt;ID&gt;, so if
    you want to view the workspace logs for an app named “clinical trial”, the pod name would look like “workspace-clinical-trial-6f94f7b944-w7j5t”.
    A reliable way to find the pod quickly is to start typing workspace- followed by the name of the app in the search bar.
  2. In the pane that opens, select Pod Logs <img>.
  3. In the Container list, select dash-app-build.

<img>

Viewing Workspace Debug Logs

Workspace debug logs are runtime logs printed by Theia, the framework behind Dash Enterprise Workspaces. These logs are usually not very expansive,
but can sometimes help with debugging.

To view workspace debug logs in Lens:

  1. Under Workloads, select Pods.
  2. In the Namespace list, select dash-apps.

<img>

  1. Find the pod for the workspace whose logs you want to view and select it. These pod names use the format workspace-&lt;app-name&gt;-&lt;ID&gt;, so if
    you want to view the workspace logs for an app named “clinical trial”, the pod name would look like “workspace-clinical-trial-6f94f7b944-w7j5t”.
    A reliable way to find the pod quickly is to start typing workspace- followed by the name of the app in the search bar.
  2. In the pane that opens, select Pod Logs <img>.
  3. In the Container list, make sure the workspace-editor container is selected.

<img>