Stay organized with collectionsSave and categorize content based on your preferences.
This page describes how to view the streaming logs of your application and to
check the status of resources from within Cloud Code.
TheDevelopment sessionsview provides a structured view of the logging output that
surfaces tasks, artifacts, and deployed resources. This view lets you
see the status of each task in your deployment and locate more information in
the full logging output.
TheLog Viewerprovides tools for searching and
filtering logs.
View the status of tasks and resources
When you start a development or debugging session, theDevelopment sessionssectiondisplays the structured logging view.
To view theDevelopment sessionssection, open the Command Palette
(pressCtrl/Cmd+Shift+P) and then run theCloud Code: Focus on development sessions explorercommand.
As a task begins, aprogress_activityspinning semi-circle progress indicator appears.
If a task succeeds, acheck_circlecheckmark appears next to the step.
If a task fails, anerrorerror mark appears next to the step.
To see details of a step, click the step in theDevelopment sessionssection. TheOutputtab displays the step in the logging output.
To view the fullSkaffoldlogs, click theStatusnode.
To view the logs for a container, expandStatus, expandStream
Application Logs, and then click the container name. The logs for the
container are displayed in theOutputtab.
Launch the Log Viewer
To launch theLog Viewer, open the command palette
(pressCtrl/Cmd+Shift+Por clickView>Command Palette) and
then runCloud Code: View Logs.
Stream logs from a pod
To stream logs from a pod:
ClickCloud Codeand then expand theKubernetessection.
Expand your minikube cluster and then expandPods.
Right-click a pod and then clickStream Logs.
If there are multiple containers in the pod, select a container when
prompted.
View logs from a pod
ClickCloud Codeand then expand theKubernetessection.
Expand your minikube cluster and then expandPods.
Right-click a pod and then clickView Logs
If there are multiple containers in the pod, select a container when
prompted.
View logs for a specific resource
To view the logs for a specific resource, follow these steps:
ClickCloud Codeand then expand theKubernetessection.
In theKubernetessection, expand the following:
The cluster whose logs you want to view
Namespaces
The namespace whose logs you want to view
Deployments
Right-click the deployment and selectView logs.
View streaming logs
To have the Log Viewer display updated logs as the logs are generated, in
the Log Viewer, turn theStreamingslider on.
View Kubernetes logs using Cloud Logging
To display logs from GKE clusters withCloud Loggingenabled, follow these steps:
To open the Log Viewer, open the command palette (pressCtrl/Cmd+Shift+Por clickView>Command Palette) and then
runCloud Code: View Logs.
To stream logs from multiple pods, turn on theStreamingslider and
selectallin thePodlist.
Logs are displayed for the active cluster by default. To switch to a
different cluster, select the cluster name from theClusterlist.
View Kubernetes logs using kubectl
To display logs from a non-GKE cluster or a
GKE cluster without Cloud Logging enabled, follow
these steps:
To open the Log Viewer, open the command palette (pressCtrl/Cmd+Shift+Por clickView>Command Palette) and then
runCloud Code: View Logs.
SelectKubectl Logsfrom theLog Typelist.
In theDeploymentorPodlist, select a deployment or pod to view
logs from.
To refine your search results, clickSearch Logsand then type
search terms. This search includes the namespace, deployment, pod, container,
and time. For clusters with Cloud Logging enabled, you can also filter
by severity level.
Change the display time
To change the display time to a different time zone, clickmore_vertMorenext to theTimecolumn header and then choose a time zone.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page outlines how to access and view streaming logs for your application and check resource statuses using Cloud Code.\u003c/p\u003e\n"],["\u003cp\u003eThe Development sessions section provides a structured logging view, indicating task progress with visual cues like checkmarks and error indicators.\u003c/p\u003e\n"],["\u003cp\u003eThe Log Viewer can be launched via the command palette to search, filter, and display application and Kubernetes logs from various sources.\u003c/p\u003e\n"],["\u003cp\u003eLogs can be streamed from specific pods, viewed for individual resources like deployments, or aggregated for GKE clusters using Cloud Logging.\u003c/p\u003e\n"],["\u003cp\u003eUsers can view Kubernetes logs using either Cloud Logging for GKE or kubectl for non-GKE clusters, with search and time zone customization options available.\u003c/p\u003e\n"]]],[],null,["# View Kubernetes logs in Cloud Code for VS Code\n\nThis page describes how to view the streaming logs of your application and to\ncheck the status of resources from within Cloud Code.\n\nThe\n[Development sessions](#view_the_status_of_tasks_and_resources)\nview provides a structured view of the logging output that\nsurfaces tasks, artifacts, and deployed resources. This view lets you\nsee the status of each task in your deployment and locate more information in\nthe full logging output.\n\nThe [Log Viewer](#launch_the_log_viewer) provides tools for searching and\nfiltering logs.\n\nView the status of tasks and resources\n--------------------------------------\n\nWhen you start a development or debugging session, the\n[**Development sessions** section](/code/docs/vscode/k8s-overview#development-section)\ndisplays the structured logging view.\n\n- To view the **Development sessions** section, open the Command Palette\n (press `Ctrl`/`Cmd`+`Shift`+`P`) and then run the\n **Cloud Code: Focus on development sessions explorer** command.\n\n- As a task begins, a\n progress_activity\n spinning semi-circle progress indicator appears.\n\n- If a task succeeds, a\n check_circle\n checkmark appears next to the step.\n\n- If a task fails, an\n error\n error mark appears next to the step.\n\n- To see details of a step, click the step in the **Development sessions**\n section. The **Output** tab displays the step in the logging output.\n\n- To view the full [Skaffold](/skaffold) logs, click the **Status** node.\n\n- To view the logs for a container, expand **Status** , expand **Stream\n Application Logs** , and then click the container name. The logs for the\n container are displayed in the **Output** tab.\n\nLaunch the Log Viewer\n---------------------\n\nTo launch the [Log Viewer](/code/docs/vscode/k8s-overview#view_logs), open the command palette\n(press `Ctrl`/`Cmd`+`Shift`+`P` or click **View** \\\u003e **Command Palette** ) and\nthen run **Cloud Code: View Logs**.\n\nStream logs from a pod\n----------------------\n\nTo stream logs from a pod:\n\n1. Click **Cloud Code** and then expand the **Kubernetes** section.\n2. Expand your minikube cluster and then expand **Pods**.\n3. Right-click a pod and then click **Stream Logs**.\n4. If there are multiple containers in the pod, select a container when prompted.\n\nView logs from a pod\n--------------------\n\n1. Click **Cloud Code** and then expand the **Kubernetes** section.\n2. Expand your minikube cluster and then expand **Pods**.\n3. Right-click a pod and then click **View Logs**\n4. If there are multiple containers in the pod, select a container when prompted.\n\nView logs for a specific resource\n---------------------------------\n\nTo view the logs for a specific resource, follow these steps:\n\n1. Click **Cloud Code** and then expand the **Kubernetes** section.\n2. In the **Kubernetes** section, expand the following:\n\n - The cluster whose logs you want to view\n - **Namespaces**\n - The namespace whose logs you want to view\n - **Deployments**\n3. Right-click the deployment and select **View logs**.\n\nView streaming logs\n-------------------\n\nTo have the Log Viewer display updated logs as the logs are generated, in\nthe Log Viewer, turn the **Streaming** slider on.\n\nView Kubernetes logs using Cloud Logging\n----------------------------------------\n\nTo display logs from GKE clusters with\n[Cloud Logging](/logging/docs) enabled, follow these steps:\n\n1. To open the Log Viewer, open the command palette (press `Ctrl`/`Cmd`+`Shift`+`P` or click **View** \\\u003e **Command Palette** ) and then run **Cloud Code: View Logs**.\n2. Select **Kubernetes Application Logs** from the **Log Type** list.\n3. To stream logs from multiple pods, turn on the **Streaming** slider and select **all** in the **Pod** list.\n4. Logs are displayed for the active cluster by default. To switch to a different cluster, select the cluster name from the **Cluster** list.\n\nView Kubernetes logs using kubectl\n----------------------------------\n\nTo display logs from a non-GKE cluster or a\nGKE cluster without Cloud Logging enabled, follow\nthese steps:\n\n1. To open the Log Viewer, open the command palette (press `Ctrl`/`Cmd`+`Shift`+`P` or click **View** \\\u003e **Command Palette** ) and then run **Cloud Code: View Logs**.\n2. Select **Kubectl Logs** from the **Log Type** list.\n3. In the **Deployment** or **Pod** list, select a deployment or pod to view logs from.\n4. To refine your search results, click **Search Logs** and then type search terms. This search includes the namespace, deployment, pod, container, and time. For clusters with Cloud Logging enabled, you can also filter by severity level.\n\nChange the display time\n-----------------------\n\nTo change the display time to a different time zone, click\nmore_vert**More**\nnext to the **Time** column header and then choose a time zone.\n\nWhat's next\n-----------\n\n- [Debug a Kubernetes application in Cloud Code](/code/docs/vscode/debug).\n- Explore the Kubernetes documentation on [troubleshooting containerized applications](https://kubernetes.io/docs/tasks/debug/debug-application/).\n\nGet Support\n-----------\n\nTo send feedback, report issues on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-vscode/issues), or ask a question on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=cloud-code-vscode)."]]