如何在 minikube 中使用新版本的 kubernetes 作为默认版本
how to use new release of kubernetes as default in minikube
我根据文章DevOps-Kubernetes-1-Running-Kubernetes-Locally-via-Minikube
安装了用于本地kubernetes开发的minikube
- Ubuntu 16.04 LTS
- minikube 0.20.0
minikube 0.20.0
的默认 kubernetes 是 v1.6.4
我使用 follow 命令来使用新版本 v1.7.0
minikube start --kubernetes-version v1.7.0
如何在 minikube 配置中将其设置为默认值?
到目前为止,如果我 运行 minikube start
,它总是默认启动 v1.6.4
即使服务器 VM 升级到 v1.7.0
$ minikube start
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
...
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.0",
GitCommit:"d3ada0119e776222f11ec7945e6d860061339aad", GitTreeState:"clean",
BuildDate:"2017-06-29T23:15:59Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server 192.168.42.96:8443 was refused - did you specify the right host or port?
您可以设置其默认值:
minikube config set kubernetes-version v1.7.0
它编辑 ~/.minikube/config/config.json
并添加:
{
"kubernetes-version": "v1.7.0"
}
查看 Selecting a Kubernetes version in the documentation. Check source code config.go 以供参考。
我根据文章DevOps-Kubernetes-1-Running-Kubernetes-Locally-via-Minikube
安装了用于本地kubernetes开发的minikube- Ubuntu 16.04 LTS
- minikube 0.20.0
minikube 0.20.0
的默认 kubernetes 是 v1.6.4
我使用 follow 命令来使用新版本 v1.7.0
minikube start --kubernetes-version v1.7.0
如何在 minikube 配置中将其设置为默认值?
到目前为止,如果我 运行 minikube start
,它总是默认启动 v1.6.4
即使服务器 VM 升级到 v1.7.0
$ minikube start
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
...
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.0",
GitCommit:"d3ada0119e776222f11ec7945e6d860061339aad", GitTreeState:"clean",
BuildDate:"2017-06-29T23:15:59Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server 192.168.42.96:8443 was refused - did you specify the right host or port?
您可以设置其默认值:
minikube config set kubernetes-version v1.7.0
它编辑 ~/.minikube/config/config.json
并添加:
{
"kubernetes-version": "v1.7.0"
}
查看 Selecting a Kubernetes version in the documentation. Check source code config.go 以供参考。