gdcloud clusters get-credentials

名稱

gdcloud clusters get-credentials - 擷取 Kubernetes 叢集的憑證。

概要

gdcloud clusters get-credentials CLUSTER_NAME [flags]

說明

使用適當的憑證和端點資訊更新 kubeconfig 檔案,為特定 Kubernetes 叢集啟用 kubectl 呼叫。

範例

To switch to working on a specific Kubernetes cluster named 'sample', run:

    gdcloud clusters get-credentials sample

To switch to working on a standard cluster named 'sample' in project 'foo', run:

    gdcloud clusters get-credentials sample --standard --project=foo

選用旗標

      --standard      If set, the standard cluster type is used.
      --zone string   Zone to use for this invocation. To preset the zone flag for all commands that require it, run: "gdcloud config set core/zone ZONE". The zone flag is available only in multi-zone environments.

GDCLOUD 廣泛旗標

所有指令都可使用這些旗標:--configuration--format--help--project--quiet

詳情請參閱 gdcloud CLI 參考資料總覽頁面。