6

ガイドに従って、Google Compute Engine 上の別のマシンから Google Container Engine クラスターを管理しようとしています。GCE インスタンスからの出力は次のとおりです。

oleksandr_berezianskyi_gmail_com@docker-managed-jenkins:~$ sudo gcloud components update preview
All components are up to date.
oleksandr_berezianskyi_gmail_com@docker-managed-jenkins:~$ sudo gcloud components update alpha
All components are up to date.
oleksandr_berezianskyi_gmail_com@docker-managed-jenkins:~$ gcloud alpha container kubectl create -f cassandra.yaml
ERROR: (gcloud.alpha.container.kubectl) This command requires the kubernetes client (kubectl), which is installed with the gcloud preview component. Run 'gcloud components update preview', or make sure kubectl is installed somewhere on your
 path.

ご覧のとおり、私の Google Cloud SDK は最新のようですが、GCE ではまだ正しく動作していません。足りないものはありますか?

4

4 に答える 4

17

gcloud components updateシステムに kubectl バイナリをインストールするように実行した場合、それはパスに含まれません。これは、cloud-sdk インストール ディレクトリにあります。実行して手動でパスに追加できます

export PATH=$PATH:/usr/local/share/google/google-cloud-sdk/bin/

/usr/local/binまたは、実行するなどして、パスに既にあるディレクトリからシンボリックリンクを作成できます

sudo ln -s /usr/local/share/google/google-cloud-sdk/bin/kubectl /usr/local/bin/kubectl

于 2015-05-04T21:25:09.290 に答える
1

(少なくとも) 138.0.0 (2016 年 11 月) の時点

雪が降るgcloud components install kubectl

これは実行時です:

Your current Cloud SDK version is: 138.0.0

関連する手順は次のとおりです。

To install or remove components at your current SDK version [138.0.0], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version [141.0.0], run:
  $ gcloud components update
于 2016-11-28T18:28:02.883 に答える
1

次の Google Cloud Storage URL から kubectl バイナリの最新バージョンをダウンロードできます: https://storage.googleapis.com/kubernetes-release/release/v0.18.2/bin/linux/amd64/kubectl

于 2015-05-04T17:44:38.473 に答える