本文记录了kubernetes1.5.2升级到kubernetes1.10一些主要的设定修改。
项目 | 升级前版本 | 目标版本 |
---|---|---|
kubernetes | 1.5.2 | 1.10 |
docker | 1.12 | 17.12 |
etcd | 3.0 | 3.3 |
二进制替换之后修改systemd相关选项
项目 | 说明 |
---|---|
对象文件 | docker.service |
exec-opt选项删除 | –exec-opt native.cgroupdriver=systemd删除 |
项目 | 说明 |
---|---|
对象文件 | kube-apiserver.service |
修改admission-control选项 | 改为enable-admission-plugins |
项目 | 说明 |
---|---|
对象文件 | kubelet.service |
修改选项 | 改为–kubeconfig=/etc/kubernetes/kubeconfig |
删除cgroup-driver选项 | cgroup-driver删除:–cgroup-driver=systemd |
添加fail-swap-on选项 | –fail-swap-on=false |
/etc/kubernetes/kubeconfig内容:
[root@host124 ~]# cat /etc/kubernetes/kubeconfig
apiVersion: v1
kind: Config
users: []
preferences: {}
clusters:
- name: default
cluster:
server: http://192.168.163.121:8080
contexts:
- context:
cluster: default
user: “”
name: default
current-context: default
[root@host124 ~]#
[root@host121 ~]# kubectl versionClient Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:55:54Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}[root@host121 ~]#
[root@host121 ~]# kubectl get node -o wideNAME STATUS ROLES AGE VERSION EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME192.168.163.122 Ready <none> 11h v1.10.0 <none> CentOS Linux 7 (Core) 3.10.0-693.el7.x86_64 docker://17.12.0-ce192.168.163.123 Ready <none> 11h v1.10.0 <none> CentOS Linux 7 (Core) 3.10.0-693.el7.x86_64 docker://17.12.0-ce192.168.163.124 Ready <none> 11h v1.10.0 <none> CentOS Linux 7 (Core) 3.10.0-693.el7.x86_64 docker://17.12.0-ce[root@host121 ~]#
联系客服