[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[[["\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."]]