Установить и настроить kubectl - PullRequest
0 голосов
/ 03 мая 2019

Я только что попытался установить kubectl на macos, но в конце получил предупреждение:

$ sudo gcloud components install kubectl
Password:


Your current Cloud SDK version is: 236.0.0
Installing components from version: 236.0.0

┌─────────────────────────────────────────────────────────────────────┐
│                 These components will be installed.                 │
├─────────────────────┬────────────────────────┬──────────────────────┤
│         Name        │        Version         │         Size         │
├─────────────────────┼────────────────────────┼──────────────────────┤
│ kubectl             │             2018.09.17 │              < 1 MiB │
│ kubectl             │                 1.10.7 │             12.8 MiB │
└─────────────────────┴────────────────────────┴──────────────────────┘

For the latest full release notes, please visit:
  https://cloud.google.com/sdk/release_notes

Do you want to continue (Y/n)?  y

╔════════════════════════════════════════════════════════════╗
╠═ Creating update staging area                             ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: kubectl                                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Installing: kubectl                                      ═╣
╠════════════════════════════════════════════════════════════╣
╠═ Creating backup and activating new installation          ═╣
╚════════════════════════════════════════════════════════════╝

Performing post processing steps...done.                                                                                                                                                                                                     

Update done!

WARNING:   There are older versions of Google Cloud Platform tools on your system PATH.
  Please remove the following to avoid accidentally invoking these old tools:

  /usr/local/Cellar/kubernetes-cli/1.13.2/bin/kubectl


$ 

Я не уверен, почему есть два из kubectl (разные версии) или как удалить старый инструмент?

Пожалуйста, сообщите.

Ответы [ 2 ]

0 голосов
/ 03 мая 2019

Тот, который установлен brew, может быть и из-за других зависимостей, например, если вы попробуете kubeless, он установил бы kubectl в каталогах brew.Вы можете удалить их или, как указано в предупреждении, убедиться, что PATH не включает установленные Brew.

0 голосов
/ 03 мая 2019

Вы установили один kubectl с помощью gcloud, а другой (в каталоге Celler) - с помощью brew install kubernetes-cli, как описано в https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-with-homebrew-on-macos

Вы можете удалить предоставленный brew kubectl с помощью brew remove kubernetes-cli, например, https://superuser.com/questions/273966/how-can-i-uninstall-using-homebrew

...