Use the Kubernetes Explorer in Cloud Code for IntelliJ

Stay organized with collections Save and categorize content based on your preferences.

The Kubernetes Explorer pane lets you access information about your clusters, nodes, workloads, and more, right from your IDE. You can also set a current context, stream and view logs, open an interactive terminal, and look up resource descriptions with the Kubernetes Explorer.

Accessing the Kubernetes Explorer

For easier management of Kubernetes resources, you can use the Kubernetes Explorer, accessible from the side panel on the right. Alternatively, it can be accessed using Tools > Cloud Code > Kubernetes > View Cluster Explorer.

Kubernetes Explorer panel open using the tab on the right side taskbar

While Cloud Code uses the default kubeconfig file, located under the '$HOME/.kube' directory, for retrieving Kubernetes resources, you can choose to use alternate kubeconfig files. Refer to Working with additional kubeconfig files for details on how to manage your kubeconfigs.

Basic actions

The Kubernetes Explorer is powered by kubectl. As long as you've configured your kubectl context to access your clusters, you can use the Kubernetes Explorer to browse all your available namespaces, resources, and nodes for your clusters, regardless of them being in the active or inactive context.

The available general Kubernetes Explorer actions, accessible via their icons in the Explorer, are:

  • New Kubernetes app from a sample icon Creating a new Kubernetes application from a sample
  • Refresh explorer icon Refreshing the Explorer
  • open docs icon Opening the Cloud Code Kubernetes documentation in a web browser

Copying resource name

You can copy any Kubernetes resource name to the clipboard (including container and cluster names).

Copying a resource name using its right-click menu

Refreshing resources

The Kubernetes Explorer watches for changes and automatically refreshes to reflect updates. To force a refresh of any Kubernetes resource to fetch its latest information, right-click the resource and choose Refresh.

Refreshing a pod using its right-click accessible refresh menu

You can force a refresh of the entire explorer using the Kubernetes Explorer's refresh button.

Refresh button for Kubernetes Explorer

Describing resources

To display the details of any non-cluster resource, choose Describe. This presents resource information in the Kubernetes Explorer console panel.

Describe option available when right-clicking an appropriate resource within the Kubernetes Explorer panel and choosing Describe

To view resource details, you can also click any resource. If it has attached metadata, the metadata is available in the Resource Details panel in the Kubernetes Explorer.

Viewing resource metadata within the Resource Details panel available in the second half of the Kubernetes Explorer

Viewing remote YAML

You can view the YAML of a resource in your cluster, right from the Kubernetes Explorer. Navigate to a resource in the Kubernetes Explorer, such as a pod, right-click the resource name, and then select View Remote YAML.

This opens the YAML file corresponding to your specified resource in a new editor tab.

Viewing the YAML of a pod by right-clicking its label in the Kubernetes Explorer and choosing 'View Remote YAML'

Streaming logs

For pods, containers, deployments, services, and replica sets, you can stream and view logs from these resources into the Kubernetes Explorer console to monitor their progress.

Streaming logs from a pod using its right-click menu to output logs into the Kubernetes Explorer Console

Launching a terminal

For pods and containers, you can open an interactive terminal.

Using the right click menu on a pod to access an interactive terminal in the Kubernetes Explorer Console

Resource-specific actions

The Kubernetes Explorer displays clusters, namespaces, nodes, workloads (such as deployments, replicasets, pods and containers), services and ingresses, configurations (such as secrets and config maps) and storage (such as volumes). Using the Kubernetes Explorer, you can perform unique actions on some of these resources.


  • Add a Google Kubernetes Engine cluster: Add an existing Standard or Autopilot GKE cluster or create a new one by clicking + Add GKE Cluster within the Kubernetes Explorer.

    This brings up the Add GKE Cluster dialog where you can choose the project and cluster you'd like to use. You can also create a new cluster and return to this dialog.

    Once done, click OK and access your chosen cluster and its underlying resources through the Kubernetes Explorer.

    Adding a GKE cluster with Kubernetes Explorer dialog with fields for project and cluster names

  • Set as current context: Set specified cluster as active such that your configured kubectl context accesses this cluster by default.

    Setting a cluster as the current context with Kubernetes Explorer

    If this action is successful, the explorer refreshes automatically and you'll see the Kubernetes symbol next to the appropriate cluster.

    Additionally, if a cluster has multiple contexts configured, you'll be able to choose one of the available contexts to set as the current context.

    Choosing and setting an active cluster from a list of multiple contexts with Kubernetes Explorer


  • Set as current context: Set a namespace as active such that your configured kubectl context accesses this namespace by default.

    Setting a namespace as current using the right-click menu

    If this action is successful, the explorer refreshes automatically and you'll see an asterisk next to the namespace to signify that it's part of the current context.

    Note that a Kubernetes context is a shortcut which gives you quick access to a namespace in your cluster. Contexts are normally created automatically when you start a minikube or GKE cluster. If you don't see the Set as current context option for a given namespace and you'd like to create a context for it, use the kubectl config set-context command in your terminal to set a context with your preferred cluster, user, and namespace.


  • Stream Logs: Stream logs from a pod into the Kubernetes Explorer Console.
  • Get Terminal: Get terminal for a pod in the Kubernetes Explorer Console.

    Additionally, running pods have colored status marks next to their labels:

    • Red: Pod is in a failed state
    • Yellow: Pod is starting or terminating
    • Green: Pod is healthy and running

    Pod status is healthy as observed by the green check mark next to the pod label


  • Stream Logs: Stream logs from a container into the Kubernetes Explorer console.
  • Get Terminal: Get a terminal for a container in the Kubernetes Explorer console.

    Streaming logs from a container using its right-click menu to output logs into the Kubernetes Explorer Console


  • Stream Logs: Stream logs from a deployment into the Kubernetes Explorer console.

    Live deployments have colored status marks next to their labels and counts of current/total replicas:

    • Yellow: Deployment does not have minimum availability or have image problems.
    • Green: Deployment is healthy and had minimum availability.

    Deployment status is healthy as observed by the green check mark next to the deployment label


Nodes of your cluster have colored status marks next to their names:

  • Yellow: Node has a resource problem such as memory or disk availability.
  • Green: Node is healthy.

Custom Resource Definitions (CRDs)

The Kubernetes Explorer lists all Custom Resource Definitions (CRDs) installed and available on your cluster:

List of custom resource definitions in the explorer

Getting support

To submit feedback or report an issue in your IntelliJ IDE, go to Tools > Cloud Code > Help / About > Submit feedback or report an issue to report an issue on GitHub, or ask a question on Stack Overflow.

You can also join the #cloud-code channel, which is part of the Google Cloud Slack community.