이 페이지에서는 Google Distributed Cloud (GDC) 오프라인 Kubernetes 클러스터에서 실행되는 기존 스테이트리스 워크로드를 검사하는 방법을 설명합니다. 스테이트리스(Stateless) 워크로드를 사용하면 데이터나 애플리케이션 상태를 저장하지 않고도 애플리케이션 배포를 실행할 수 있습니다. GDC 콘솔 또는 kubectl CLI를 사용하여 상태 비저장 워크로드를 확인하여 리소스 사용량과 워크로드 상태를 모니터링할 수 있습니다.
이 페이지는 조직의 애플리케이션 워크로드를 관리하는 애플리케이션 운영자 그룹 내 개발자를 위한 페이지입니다. 자세한 내용은 GDC 오프라인 문서 대상을 참고하세요.
[[["이해하기 쉬움","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 outlines how to view and inspect container workloads and \u003ccode\u003eDeployment\u003c/code\u003e objects within a Kubernetes project, either through the console or the command-line interface (CLI).\u003c/p\u003e\n"],["\u003cp\u003eBefore accessing workloads, users need to obtain the Kubernetes cluster name, generate a kubeconfig file, and ensure they have the appropriate permissions, such as the Workload Viewer or Namespace Admin role.\u003c/p\u003e\n"],["\u003cp\u003eUsers can view container workloads in the console, seeing details like name, type, number of pods, cluster, and last modified date, organized by Kubernetes cluster.\u003c/p\u003e\n"],["\u003cp\u003eUsing the CLI, users can retrieve detailed information about a \u003ccode\u003eDeployment\u003c/code\u003e object, display its configuration in YAML format, list \u003ccode\u003ePod\u003c/code\u003e objects associated with the deployment using key-value labels, or obtain specifics about a specific \u003ccode\u003ePod\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekubectl\u003c/code\u003e command is required to interact with the cluster, using commands such as \u003ccode\u003eget pods\u003c/code\u003e, \u003ccode\u003edescribe deployment\u003c/code\u003e, \u003ccode\u003eget deployments -o yaml\u003c/code\u003e and \u003ccode\u003edescribe pod\u003c/code\u003e, allowing for different interactions with the project's workloads.\u003c/p\u003e\n"]]],[],null,["# Inspect stateless workloads\n\nThis page explains how to inspect existing stateless workloads running in a\nGoogle Distributed Cloud (GDC) air-gapped Kubernetes cluster. Stateless workloads let you\nrun your application deployment without having to store data or application\nstate. You can view your stateless workloads with the GDC console or\nthe kubectl CLI to monitor resource usage and workload health.\n\nThis page is for developers within the application operator group, who are\nresponsible for managing application workloads for their organization. For more\ninformation, see\n[Audiences for GDC air-gapped documentation](/distributed-cloud/hosted/docs/latest/gdch/resources/audiences).\n\nBefore you begin\n----------------\n\nTo run commands against a\n[Kubernetes cluster](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/clusters#cluster-architecture),\nmake sure you have the following resources:\n\n1. Locate the Kubernetes cluster name, or ask your Platform Administrator what\n the cluster name is.\n\n2. [Sign in and generate](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/iam/sign-in#zonal-cluster-kubeconfig)\n the kubeconfig file for the Kubernetes cluster if you don't have one.\n\n3. Use the kubeconfig path of the Kubernetes cluster to replace\n \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_KUBECONFIG\u003c/var\u003e in these instructions.\n\nTo get the required permissions to view all workloads deployed in a project, ask\nyour Organization IAM Admin to grant you the Workload Viewer role\n(`workload-viewer`) in your project namespace.\n\nTo get the required permissions to inspect stateless workloads, ask your\nOrganization IAM Admin to grant you the Namespace Admin role (`namespace-admin`)\nin your project namespace.\n\nView a project's container workloads\n------------------------------------\n\nTo view your project's container workloads, complete the following: \n\n### Console\n\n- In the navigation menu, select **Kubernetes Engine \\\u003e Workloads**.\n\n You can view details for your container workloads, such as the following:\n - Name\n - Type\n - Number of pods\n - Kubernetes cluster\n - Last modified date\n\n The container workloads are organized by which Kubernetes cluster they\n belong to. Select the **Cluster** drop-down to switch the cluster context.\n\n### CLI\n\n- Run the following command to list all pods in your project:\n\n kubectl get pods -n \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e\n\n The output is similar to the following: \n\n NAME READY STATUS RESTARTS AGE\n nginx-workload-ah-aa-1228 1/1 Running 0 12h\n nginx-workload-ah-ab-6784 1/1 Running 0 11h\n nginx-workload-ah-ac-0045 1/1 Running 0 12h\n\nInspect the deployment\n----------------------\n\nTo request more detailed information about the components of a `Deployment`\nresource, run commands that directly target the entity you're looking to\ninspect.\n\n### Get `Deployment` object information\n\nTo get detailed information about the `Deployment` object, run: \n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_KUBECONFIG\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e \\\n describe deployment \u003cvar translate=\"no\"\u003eDEPLOYMENT_NAME\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_KUBECONFIG\u003c/var\u003e: the kubeconfig file for the\n cluster running the deployment.\n\n- \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e: the project namespace.\n\n- \u003cvar translate=\"no\"\u003eDEPLOYMENT_NAME\u003c/var\u003e: the name of the `Deployment` object.\n\n### Display live configuration in YAML format\n\nTo view a `Deployment` object's manifest, run: \n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_KUBECONFIG\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e \\\n get deployments \u003cvar translate=\"no\"\u003eDEPLOYMENT_NAME\u003c/var\u003e -o yaml\n\nThis command displays the `Deployment` object's live configuration in YAML\nformat.\n\n### List pods\n\nTo list the `Pod` objects created by the deployment, run: \n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_KUBECONFIG\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e \\\n get pods -l \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nv\"\u003eKEY\u003c/span\u003e\u003c/var\u003e=\u003cvar translate=\"no\"\u003eVALUE\u003c/var\u003e\n\nIn this command, the `-l` flag lists all `Pod` objects with the specified\nkey-value pair label in the specified cluster.\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_KUBECONFIG\u003c/var\u003e: the kubeconfig file for the\n cluster running the deployment.\n\n- \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e: the project namespace.\n\n- \u003cvar translate=\"no\"\u003eKEY\u003c/var\u003e: the key for the key-value pair label set in the\n deployment. For example, if the `.template.metadata.labels` field has the\n `app: myapp` label configured, the key is `app`.\n\n- \u003cvar translate=\"no\"\u003eVALUE\u003c/var\u003e: the value for the key-value pair label set in\n the deployment. For example, if the `.template.metadata.labels` field has the\n `app: myapp` label configured, the value is `my-app`.\n\nFor example, if you labeled the `Deployment` object `app: my-app`, you'd run the\nfollowing command to see `Pod` objects with that label: \n\n kubectl --kubeconfig /tmp/kubeconfig.yaml -n my-namespace \\\n get pods -l app=my-app\n\n### Get specific pod information\n\nTo get information about a specific `Pod` object, run: \n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_KUBECONFIG\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e \\\n describe pod \u003cvar translate=\"no\"\u003ePOD_NAME\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eKUBERNETES_CLUSTER_KUBECONFIG\u003c/var\u003e: the kubeconfig file for the\n cluster running the deployment.\n\n- \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e: the project namespace.\n\n- \u003cvar translate=\"no\"\u003ePOD_NAME\u003c/var\u003e: the name of the pod managed by the\n deployment."]]