Ikuti petunjuk yang muncul untuk memulai konfigurasi. Anda harus
menyediakan dua properti untuk menyelesaikan inisialisasi:
organization_console_url: URL ke konsol organisasi GDC
Anda saat ini. URL ini dapat bersifat global atau per zona:
Untuk URL konsol global, gunakan sintaksis
https://console.ORG_NAME.SUFFIX,
seperti https://console.org-1.gdch.google.com.
Untuk URL konsol zona, gunakan sintaksis
https://console.ORG_NAME.ZONE.SUFFIX,
seperti https://console.org-1.zone-1.gdch.google.com.
project: Nama project GDC Anda saat ini.
Lihat properti ini menggunakan perintah gdcloud config list.
Mengelola komponen gdcloud CLI
Komponen adalah bagian GDC CLI yang dapat diinstal. gdcloud CLI diinstal secara default. Buat daftar, instal, dan update
komponen gdcloud CLI sesuai kebutuhan.
Mencantumkan komponen
Lihat daftar komponen yang tersedia saat ini:
gdcloudcomponentslist
Menginstal komponen
Instal komponen pada penginstalan gcloud CLI versi saat ini:
gdcloudcomponentsinstallCOMPONENT_ID
Misalnya, perintah ini menginstal komponen kubectl:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\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)."]]