[[["易于理解","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-02。"],[[["\u003cp\u003eThe gdcloud CLI requires adding its \u003ccode\u003ebin\u003c/code\u003e directory to your system's path for proper functionality and command execution.\u003c/p\u003e\n"],["\u003cp\u003eInitialization of the gdcloud CLI is performed using the \u003ccode\u003egdcloud init\u003c/code\u003e command and requires specifying the organization console URL and project name.\u003c/p\u003e\n"],["\u003cp\u003eThe organization console URL can be either global or zonal and must follow a specific syntax depending on the scope.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egdcloud components\u003c/code\u003e command suite allows for managing (listing, installing, updating) the individual parts of the GDC CLI.\u003c/p\u003e\n"],["\u003cp\u003eInstalled components can be accessed using their respective command names, such as \u003ccode\u003ekubectl\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Install the gdcloud CLI\n\nTo install and initialize the Distributed Cloud CLI,\n[download the CLI bundle](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-download) and complete\nthe following steps.\n\nAdd gdcloud CLI bin directory to path\n-------------------------------------\n\nGoogle recommends adding the gdcloud CLI `bin` directory to your\npath.\n\nWhen the `bin` directory is added to your path:\n\n- You won't have to specify the entire directory structure with each command.\n- Crucial gdcloud CLI components are installed in the `bin` directory that allow commands like `gdcloud components` to work correctly.\n\n| **Note:** The commands in the following sections assume the `google-distributed-cloud-hosted-cli` folder is in the current working directory.\n\nAdd the gdcloud CLI `bin` directory to your path: \n\n eval echo 'export GDCLOUD_PATH=$(pwd)/google-distributed-cloud-hosted-cli' \u003e\u003e ~/.bashrc\n echo 'export PATH=\"$GDCLOUD_PATH/bin:$PATH\"' \u003e\u003e ~/.bashrc\n source ~/.bashrc\n\nInitialize gdcloud CLI default configuration\n--------------------------------------------\n\nInitialize the gdcloud CLI default configuration: \n\n gdcloud init\n\nFollow the prompted instructions to initialize the configuration. You must\nprovide two properties to complete the initialization:\n\n- `organization_console_url`: The URL to your current GDC organization's console. This URL can be global or zonal:\n - For a global console URL, use the syntax `https://console.`\u003cvar translate=\"no\"\u003eORG_NAME\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003eSUFFIX\u003c/var\u003e, such as `https://console.org-1.gdch.google.com`.\n - For a zonal console URL, use the syntax `https://console.`\u003cvar translate=\"no\"\u003eORG_NAME\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003eSUFFIX\u003c/var\u003e, such as `https://console.org-1.zone-1.gdch.google.com`.\n- `project`: The name of your current GDC project.\n\nView these properties using the `gdcloud config list` command.\n\nManage gdcloud CLI components\n-----------------------------\n\nComponents are installable parts of the GDC CLI. The\ngdcloud CLI is installed by default. List, install, and update\ngdcloud CLI components as needed.\n\n### List components\n\nView the current list of available components: \n\n gdcloud components list\n\n### Install components\n\nInstall a component on the current version of your gdcloud CLI\ninstallation: \n\n gdcloud components install \u003cvar translate=\"no\"\u003eCOMPONENT_ID\u003c/var\u003e\n\nFor example, this command installs the `kubectl` component: \n\n gdcloud components install kubectl\n\n### Update components\n\nTo update all GDC components to the latest version of\nthe gdcloud CLI, see\n[Upgrade to the latest gdcloud CLI](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-upgrade)."]]