美文网首页
brew install minikube成功后,不是最新版本,

brew install minikube成功后,不是最新版本,

作者: 土豆特别想爬山 | 来源:发表于2022-06-06 18:56 被阅读0次

之前电脑装过minikube是v1.20.0

 % minikube version
minikube version: v1.20.0
commit: c61663e942ec43b20e8e70839dcca52e44cd85ae

检查版本:

% minikube update-check
CurrentVersion: v1.20.0
LatestVersion: v1.25.2

后来用brew install minikube安装:

% brew install  minikube
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/kubernetes-cli-1.24.1.monterey.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/minikube-1.25.2.monterey.bottle.tar.gz
######################################################################## 100.0%
==> Installing dependencies for minikube: kubernetes-cli
==> Installing minikube dependency: kubernetes-cli
==> Pouring kubernetes-cli-1.24.1.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/kubernetes-cli/1.24.1: 228 files, 56.3MB
==> Installing minikube
==> Pouring minikube-1.25.2.monterey.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/minikube
Target /usr/local/bin/minikube
already exists. You may want to remove it:
  rm '/usr/local/bin/minikube'

To force the link and overwrite all conflicting files:
  brew link --overwrite minikube

To list all files that would be deleted:
  brew link --overwrite --dry-run minikube

Possible conflicting files are:
/usr/local/bin/minikube
==> Caveats
zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/minikube/1.25.2: 9 files, 72.3MB
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
……
……
Pruned 3 symbolic links and 14 directories from /usr/local
==> Caveats
==> minikube
zsh completions have been installed to:
  /usr/local/share/zsh/site-functions

再次检查版本:

% minikube update-check
CurrentVersion: v1.20.0
LatestVersion: v1.25.2

版本并没有变成最新的v1.25.2,尽管已经安装成功了!再次尝试更新minikube,提示 v1.25.2已经安装了:

 % brew upgrade minikube 
Warning: minikube 1.25.2 already installed

解决:

% minikube delete
% sudo rm -rf ~/.minikube
% sudo rm -rf /usr/local/bin/minikube
% brew link minikube
Linking /usr/local/Cellar/minikube/1.25.2... 4 symlinks created.

然后重新minikube start

% minikube start
😄  Darwin 12.4 上的 minikube v1.25.2
✨  自动选择 docker 驱动。其他选项:hyperkit, ssh
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
💾  Downloading Kubernetes v1.23.3 preload ...
    > gcr.io/k8s-minikube/kicbase: 379.06 MiB / 379.06 MiB  100.00% 280.22 KiB 
    > preloaded-images-k8s-v17-v1...: 505.68 MiB / 505.68 MiB  100.00% 326.72 K
🔥  Creating docker container (CPUs=2, Memory=1985MB) ...
🐳  正在 Docker 20.10.12 中准备 Kubernetes v1.23.3…
    ▪ kubelet.housekeeping-interval=5m
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

查看状态:

% minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

查看profile

% minikube profile list
|----------|-----------|---------|--------------|------|---------|---------|-------|
| Profile  | VM Driver | Runtime |      IP      | Port | Version | Status  | Nodes |
|----------|-----------|---------|--------------|------|---------|---------|-------|
| minikube | docker    | docker  | 192.168.49.2 | 8443 | v1.23.3 | Running |     1 |
|----------|-----------|---------|--------------|------|---------|---------|-------|

相关文章

网友评论

      本文标题:brew install minikube成功后,不是最新版本,

      本文链接:https://www.haomeiwen.com/subject/kwwjmrtx.html