이 페이지에서는 Google Distributed Cloud (GDC) 에어 갭 어플라이언스 Kubernetes 클러스터에서 실행되는 기존 스테이트리스 워크로드를 검사하는 방법을 설명합니다. 스테이트리스(Stateless) 워크로드를 사용하면 데이터나 애플리케이션 상태를 저장하지 않고도 애플리케이션 배포를 실행할 수 있습니다. GDC 콘솔 또는 kubectl CLI를 사용하여 스테이트리스 워크로드를 확인하여 리소스 사용량과 워크로드 상태를 모니터링할 수 있습니다.
이 페이지는 조직의 애플리케이션 워크로드를 관리하는 애플리케이션 운영자 그룹의 개발자를 위한 페이지입니다.
시작하기 전에
사전 구성된 베어메탈 Kubernetes 클러스터에 대해 명령어를 실행하려면 다음 리소스가 있어야 합니다.
Kubernetes 클러스터 이름을 찾거나 플랫폼 관리자에게 클러스터 이름을 문의합니다.
Kubernetes 클러스터의 kubeconfig 파일이 없는 경우 로그인 및 생성합니다.
Kubernetes 클러스터의 kubeconfig 경로를 사용하여 이 안내의 CLUSTER_KUBECONFIG를 바꿉니다.
프로젝트에 배포된 모든 워크로드를 보는 데 필요한 권한을 얻으려면 조직 IAM 관리자에게 프로젝트 네임스페이스에 워크로드 뷰어 역할(workload-viewer)을 부여해 달라고 요청하세요.
상태 비저장 워크로드를 검사하는 데 필요한 권한을 얻으려면 조직 IAM 관리자에게 프로젝트 네임스페이스에 네임스페이스 관리자 역할 (namespace-admin)을 부여해 달라고 요청하세요.
프로젝트의 컨테이너 워크로드 보기
다음 명령어를 실행하여 프로젝트의 모든 포드를 나열합니다.
kubectlgetpods-nPROJECT_NAMESPACE
출력은 다음과 비슷합니다.
NAME READY STATUS RESTARTS AGE
nginx-workload-ah-aa-1228 1/1 Running 0 12h
nginx-workload-ah-ab-6784 1/1 Running 0 11h
nginx-workload-ah-ac-0045 1/1 Running 0 12h
배포 검사
Deployment 리소스의 구성요소에 관한 자세한 정보를 요청하려면 검사하려는 항목을 직접 타겟팅하는 명령어를 실행하세요.
[[["이해하기 쉬움","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-05(UTC)"],[[["\u003cp\u003eAfter creating a \u003ccode\u003eDeployment\u003c/code\u003e object, you can use \u003ccode\u003ekubectl\u003c/code\u003e commands to request detailed information about the \u003ccode\u003eDeployment\u003c/code\u003e and its managed resources.\u003c/p\u003e\n"],["\u003cp\u003eTo inspect deployments, you will need the user cluster name and its associated kubeconfig file, and you may need to be granted the Namespace Admin role.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve comprehensive details about a \u003ccode\u003eDeployment\u003c/code\u003e object by using the \u003ccode\u003ekubectl describe deployment\u003c/code\u003e command, specifying the deployment's name and the correct user cluster kubeconfig.\u003c/p\u003e\n"],["\u003cp\u003eTo view the live configuration of a \u003ccode\u003eDeployment\u003c/code\u003e object in YAML format, utilize the \u003ccode\u003ekubectl get deployments\u003c/code\u003e command with the \u003ccode\u003e-o yaml\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekubectl get pods\u003c/code\u003e command with the \u003ccode\u003e-l\u003c/code\u003e flag can be used to list all \u003ccode\u003ePod\u003c/code\u003e objects associated with a specific key-value pair label in the user cluster, and \u003ccode\u003ekubectl describe pod\u003c/code\u003e can be used to get information about a specific pod.\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 appliance 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.\n\nBefore you begin\n----------------\n\nTo run commands against the pre-configured bare metal Kubernetes cluster, make sure you have the\nfollowing resources:\n\n1. Locate the Kubernetes cluster name, or ask your Platform\n Administrator what the cluster name is.\n\n2. [Sign in and generate](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/iam/sign-in#kubernetes-cluster-kubeconfig) the\n 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\"\u003eCLUSTER_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\nRun 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\nThe 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\"\u003eCLUSTER_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\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e: the kubeconfig file for the\n Kubernetes 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\"\u003eCLUSTER_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\"\u003eCLUSTER_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.\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e: the kubeconfig file for the\n Kubernetes 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\"\u003eCLUSTER_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\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e: the kubeconfig file for the\n Kubernetes 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."]]