我已将kubectl client version
更新到最新版本,但由于客户端和服务器版本不同,无法将kubectl server version
更新到最晚版本。问题是:如何更新kubectl server version
?
p.S我在docker上运行minikube本地
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"9e991415386e4cf155a24b1da15becaa390438d8", GitTreeState:"clean", BuildDate:"2020-03-25T14:50:46Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.22) and server (1.18) exceeds the supported minor version skew of +/-1 ```
```commands which i used to update Kubectl client version are below (for mac intel chip):
Link reference: https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/ ```
发布社区wiki答案以提高可见性。请随意扩展。
您需要升级您的minikube版本才能升级kubectl服务器版本。
基于这个答案,在macOS上升级minikube,你只需要运行以下命令(自2020年以来(:
brew update
brew upgrade minikube
如果你遇到任何问题,我建议从你的系统中完全删除minikube(基于这个GitHub页面(:
minikube stop; minikube delete &&
docker stop $(docker ps -aq) &&
rm -rf ~/.kube ~/.minikube &&
sudo rm -rf /usr/local/bin/localkube /usr/local/bin/minikube &&
launchctl stop '*kubelet*.mount' &&
launchctl stop localkube.service &&
launchctl disable localkube.service &&
sudo rm -rf /etc/kubernetes/ &&
docker system prune -af --volumes
然后,您可以使用brew:从头开始安装最新版本的minikube
brew install minikube
通过下载和安装二进制文件:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
sudo install minikube-darwin-amd64 /usr/local/bin/minikube