[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThis guide explains how to use Cloud Code to view application streaming logs and check resource status.\u003c/p\u003e\n"],["\u003cp\u003eThe Development sessions view provides a structured output of tasks, artifacts, and deployed resources, showing the status of each deployment task.\u003c/p\u003e\n"],["\u003cp\u003eThe Log Viewer can be launched to search, filter, and stream logs from pods, resources, and Kubernetes clusters with or without Cloud Logging.\u003c/p\u003e\n"],["\u003cp\u003eLogs can be accessed by right-clicking on a pod or specific resource in the Kubernetes section of Cloud Code and selecting "Stream Logs" or "View Logs".\u003c/p\u003e\n"],["\u003cp\u003eYou can change the time zone displayed in the logs viewer by clicking the more options menu next to the time column header.\u003c/p\u003e\n"]]],[],null,["# View Kubernetes logs in Cloud Code for Cloud Shell\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/shell/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/shell/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/shell/debug).\n- Explore the Kubernetes documentation on [troubleshooting containerized applications](https://kubernetes.io/docs/tasks/debug/debug-application/)."]]