[[["이해하기 쉬움","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-08-11(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)."]]