Kubernetes版本升级到v1.18.0方法

升级k8s版本才能使用kube-prometheus安装监控

1、查看集群状态

[root@k8s-master k8s-script]# kubectl get nodes
NAME         STATUS   ROLES    AGE     VERSION
k8s-master   Ready    master   5d22h   v1.18.0
k8s-slave1   Ready    <none>   4d10h   v1.18.0
k8s-slave2   Ready    <none>   4d10h   v1.18.0
[root@k8s-master k8s-script]# kubectl get pods -n kube-system
NAME                                         READY   STATUS    RESTARTS   AGE
coredns-7ff77c879f-nzw77                     1/1     Running   5          5d22h
coredns-7ff77c879f-x5gc9                     1/1     Running   5          5d22h
dashboard-metrics-scraper-6b4884c9d5-8cxd8   1/1     Running   4          4d7h
etcd-k8s-master                              1/1     Running   6          5d22h
kube-apiserver-k8s-master                    1/1     Running   6          5d22h
kube-controller-manager-k8s-master           1/1     Running   7          5d22h
kube-proxy-8m9lq                             1/1     Running   6          4d10h
kube-proxy-jr72q                             1/1     Running   5          4d10h
kube-proxy-kv9n5                             1/1     Running   6          5d22h
kube-scheduler-k8s-master                    1/1     Running   7          5d22h
kubernetes-dashboard-c98496485-ch4lw         1/1     Running   4          4d7h

2、把master节点设置为不可调度

[root@k8s-master ~]# kubectl drain k8s-master --ignore-daemonsets --force
node/k8s-master already cordoned
WARNING: ignoring DaemonSet-managed Pods: kube-flannel/kube-flannel-ds-jpllk, kube-system/kube-proxy-kv9n5
evicting pod kube-system/coredns-7ff77c879f-nzw77
pod/coredns-7ff77c879f-nzw77 evicted
node/k8s-master evicted

3、把要升级的节点上的服务驱逐到别的节点上


[root@k8s-master ~]# # kubectl drain k8s-master --ignore-daemonsets --force

4、查看kueadm的所有版本

[root@k8s-master ~]# yum list kubeadm.x86_64 --showduplicates
已加载插件:fastestmirror, langpacks
Determining fastest mirrors* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
已安装的软件包
kubeadm.x86_64                               1.18.0-0                                @kubernetes
可安装的软件包
kubeadm.x86_64                               1.6.0-0                                 kubernetes 
kubeadm.x86_64                               1.6.1-0                                 kubernetes 
kubeadm.x86_64                               1.6.2-0                                 kubernetes 
kubeadm.x86_64                               1.6.3-0                                 kubernetes 
kubeadm.x86_64                               1.6.4-0                                 kubernetes 
kubeadm.x86_64                               1.6.5-0                                 kubernetes 
kubeadm.x86_64                               1.6.6-0                                 kubernetes 
kubeadm.x86_64                               1.6.7-0                                 kubernetes 
kubeadm.x86_64                               1.6.8-0                                 kubernetes 
kubeadm.x86_64                               1.6.9-0                                 kubernetes 
kubeadm.x86_64                               1.6.10-0                                kubernetes 
kubeadm.x86_64                               1.6.11-0                                kubernetes 
kubeadm.x86_64                               1.6.12-0                                kubernetes 
kubeadm.x86_64                               1.6.13-0                                kubernetes 
kubeadm.x86_64                               1.7.0-0                                 kubernetes 
kubeadm.x86_64                               1.7.1-0                                 kubernetes 
kubeadm.x86_64                               1.7.2-0                                 kubernetes 
kubeadm.x86_64                               1.7.3-1                                 kubernetes 
kubeadm.x86_64                               1.7.4-0                                 kubernetes 
kubeadm.x86_64                               1.7.5-0                                 kubernetes 
kubeadm.x86_64                               1.7.6-1                                 kubernetes 
kubeadm.x86_64                               1.7.7-1                                 kubernetes 
kubeadm.x86_64                               1.7.8-1                                 kubernetes 
kubeadm.x86_64                               1.7.9-0                                 kubernetes 
kubeadm.x86_64                               1.7.10-0                                kubernetes 
kubeadm.x86_64                               1.7.11-0                                kubernetes 
kubeadm.x86_64                               1.7.14-0                                kubernetes 
kubeadm.x86_64                               1.7.15-0                                kubernetes 
kubeadm.x86_64                               1.7.16-0                                kubernetes 
kubeadm.x86_64                               1.8.0-0                                 kubernetes 
kubeadm.x86_64                               1.8.0-1                                 kubernetes 
kubeadm.x86_64                               1.8.1-0                                 kubernetes 
kubeadm.x86_64                               1.8.2-0                                 kubernetes 
kubeadm.x86_64                               1.8.3-0                                 kubernetes 
kubeadm.x86_64                               1.8.4-0                                 kubernetes 
kubeadm.x86_64                               1.8.5-0                                 kubernetes 
kubeadm.x86_64                               1.8.6-0                                 kubernetes 
kubeadm.x86_64                               1.8.7-0                                 kubernetes 
kubeadm.x86_64                               1.8.8-0                                 kubernetes 
kubeadm.x86_64                               1.8.9-0                                 kubernetes 
kubeadm.x86_64                               1.8.10-0                                kubernetes 
kubeadm.x86_64                               1.8.11-0                                kubernetes 
kubeadm.x86_64                               1.8.12-0                                kubernetes 
kubeadm.x86_64                               1.8.13-0                                kubernetes 
kubeadm.x86_64                               1.8.14-0                                kubernetes 
kubeadm.x86_64                               1.8.15-0                                kubernetes 
kubeadm.x86_64                               1.9.0-0                                 kubernetes 
kubeadm.x86_64                               1.9.1-0                                 kubernetes 
kubeadm.x86_64                               1.9.2-0                                 kubernetes 
kubeadm.x86_64                               1.9.3-0                                 kubernetes 
kubeadm.x86_64                               1.9.4-0                                 kubernetes 
kubeadm.x86_64                               1.9.5-0                                 kubernetes 
kubeadm.x86_64                               1.9.6-0                                 kubernetes 
kubeadm.x86_64                               1.9.7-0                                 kubernetes 
kubeadm.x86_64                               1.9.8-0                                 kubernetes 
kubeadm.x86_64                               1.9.9-0                                 kubernetes 
kubeadm.x86_64                               1.9.10-0                                kubernetes 
kubeadm.x86_64                               1.9.11-0                                kubernetes 
kubeadm.x86_64                               1.10.0-0                                kubernetes 
kubeadm.x86_64                               1.10.1-0                                kubernetes 
kubeadm.x86_64                               1.10.2-0                                kubernetes 
kubeadm.x86_64                               1.10.3-0                                kubernetes 
kubeadm.x86_64                               1.10.4-0                                kubernetes 
kubeadm.x86_64                               1.10.5-0                                kubernetes 
kubeadm.x86_64                               1.10.6-0                                kubernetes 
kubeadm.x86_64                               1.10.7-0                                kubernetes 
kubeadm.x86_64                               1.10.8-0                                kubernetes 
kubeadm.x86_64                               1.10.9-0                                kubernetes 
kubeadm.x86_64                               1.10.10-0                               kubernetes 
kubeadm.x86_64                               1.10.11-0                               kubernetes 
kubeadm.x86_64                               1.10.12-0                               kubernetes 
kubeadm.x86_64                               1.10.13-0                               kubernetes 
kubeadm.x86_64                               1.11.0-0                                kubernetes 
kubeadm.x86_64                               1.11.1-0                                kubernetes 
kubeadm.x86_64                               1.11.2-0                                kubernetes 
kubeadm.x86_64                               1.11.3-0                                kubernetes 
kubeadm.x86_64                               1.11.4-0                                kubernetes 
kubeadm.x86_64                               1.11.5-0                                kubernetes 
kubeadm.x86_64                               1.11.6-0                                kubernetes 
kubeadm.x86_64                               1.11.7-0                                kubernetes 
kubeadm.x86_64                               1.11.8-0                                kubernetes 
kubeadm.x86_64                               1.11.9-0                                kubernetes 
kubeadm.x86_64                               1.11.10-0                               kubernetes 
kubeadm.x86_64                               1.12.0-0                                kubernetes 
kubeadm.x86_64                               1.12.1-0                                kubernetes 
kubeadm.x86_64                               1.12.2-0                                kubernetes 
kubeadm.x86_64                               1.12.3-0                                kubernetes 
kubeadm.x86_64                               1.12.4-0                                kubernetes 
kubeadm.x86_64                               1.12.5-0                                kubernetes 
kubeadm.x86_64                               1.12.6-0                                kubernetes 
kubeadm.x86_64                               1.12.7-0                                kubernetes 
kubeadm.x86_64                               1.12.8-0                                kubernetes 
kubeadm.x86_64                               1.12.9-0                                kubernetes 
kubeadm.x86_64                               1.12.10-0                               kubernetes 
kubeadm.x86_64                               1.13.0-0                                kubernetes 
kubeadm.x86_64                               1.13.1-0                                kubernetes 
kubeadm.x86_64                               1.13.2-0                                kubernetes 
kubeadm.x86_64                               1.13.3-0                                kubernetes 
kubeadm.x86_64                               1.13.4-0                                kubernetes 
kubeadm.x86_64                               1.13.5-0                                kubernetes 
kubeadm.x86_64                               1.13.6-0                                kubernetes 
kubeadm.x86_64                               1.13.7-0                                kubernetes 
kubeadm.x86_64                               1.13.8-0                                kubernetes 
kubeadm.x86_64                               1.13.9-0                                kubernetes 
kubeadm.x86_64                               1.13.10-0                               kubernetes 
kubeadm.x86_64                               1.13.11-0                               kubernetes 
kubeadm.x86_64                               1.13.12-0                               kubernetes 
kubeadm.x86_64                               1.14.0-0                                kubernetes 
kubeadm.x86_64                               1.14.1-0                                kubernetes 
kubeadm.x86_64                               1.14.2-0                                kubernetes 
kubeadm.x86_64                               1.14.3-0                                kubernetes 
kubeadm.x86_64                               1.14.4-0                                kubernetes 
kubeadm.x86_64                               1.14.5-0                                kubernetes 
kubeadm.x86_64                               1.14.6-0                                kubernetes 
kubeadm.x86_64                               1.14.7-0                                kubernetes 
kubeadm.x86_64                               1.14.8-0                                kubernetes 
kubeadm.x86_64                               1.14.9-0                                kubernetes 
kubeadm.x86_64                               1.14.10-0                               kubernetes 
kubeadm.x86_64                               1.15.0-0                                kubernetes 
kubeadm.x86_64                               1.15.1-0                                kubernetes 
kubeadm.x86_64                               1.15.2-0                                kubernetes 
kubeadm.x86_64                               1.15.3-0                                kubernetes 
kubeadm.x86_64                               1.15.4-0                                kubernetes 
kubeadm.x86_64                               1.15.5-0                                kubernetes 
kubeadm.x86_64                               1.15.6-0                                kubernetes 
kubeadm.x86_64                               1.15.7-0                                kubernetes 
kubeadm.x86_64                               1.15.8-0                                kubernetes 
kubeadm.x86_64                               1.15.9-0                                kubernetes 
kubeadm.x86_64                               1.15.10-0                               kubernetes 
kubeadm.x86_64                               1.15.11-0                               kubernetes 
kubeadm.x86_64                               1.15.12-0                               kubernetes 
kubeadm.x86_64                               1.16.0-0                                kubernetes 
kubeadm.x86_64                               1.16.1-0                                kubernetes 
kubeadm.x86_64                               1.16.2-0                                kubernetes 
kubeadm.x86_64                               1.16.3-0                                kubernetes 
kubeadm.x86_64                               1.16.4-0                                kubernetes 
kubeadm.x86_64                               1.16.5-0                                kubernetes 
kubeadm.x86_64                               1.16.6-0                                kubernetes 
kubeadm.x86_64                               1.16.7-0                                kubernetes 
kubeadm.x86_64                               1.16.8-0                                kubernetes 
kubeadm.x86_64                               1.16.9-0                                kubernetes 
kubeadm.x86_64                               1.16.10-0                               kubernetes 
kubeadm.x86_64                               1.16.11-0                               kubernetes 
kubeadm.x86_64                               1.16.11-1                               kubernetes 
kubeadm.x86_64                               1.16.12-0                               kubernetes 
kubeadm.x86_64                               1.16.13-0                               kubernetes 
kubeadm.x86_64                               1.16.14-0                               kubernetes 
kubeadm.x86_64                               1.16.15-0                               kubernetes 
kubeadm.x86_64                               1.17.0-0                                kubernetes 
kubeadm.x86_64                               1.17.1-0                                kubernetes 
kubeadm.x86_64                               1.17.2-0                                kubernetes 
kubeadm.x86_64                               1.17.3-0                                kubernetes 
kubeadm.x86_64                               1.17.4-0                                kubernetes 
kubeadm.x86_64                               1.17.5-0                                kubernetes 
kubeadm.x86_64                               1.17.6-0                                kubernetes 
kubeadm.x86_64                               1.17.7-0                                kubernetes 
kubeadm.x86_64                               1.17.7-1                                kubernetes 
kubeadm.x86_64                               1.17.8-0                                kubernetes 
kubeadm.x86_64                               1.17.9-0                                kubernetes 
kubeadm.x86_64                               1.17.11-0                               kubernetes 
kubeadm.x86_64                               1.17.12-0                               kubernetes 
kubeadm.x86_64                               1.17.13-0                               kubernetes 
kubeadm.x86_64                               1.17.14-0                               kubernetes 
kubeadm.x86_64                               1.17.15-0                               kubernetes 
kubeadm.x86_64                               1.17.16-0                               kubernetes 
kubeadm.x86_64                               1.17.17-0                               kubernetes 
kubeadm.x86_64                               1.18.0-0                                kubernetes 
kubeadm.x86_64                               1.18.1-0                                kubernetes 
kubeadm.x86_64                               1.18.2-0                                kubernetes 
kubeadm.x86_64                               1.18.3-0                                kubernetes 
kubeadm.x86_64                               1.18.4-0                                kubernetes 
kubeadm.x86_64                               1.18.4-1                                kubernetes 
kubeadm.x86_64                               1.18.5-0                                kubernetes 
kubeadm.x86_64                               1.18.6-0                                kubernetes 
kubeadm.x86_64                               1.18.8-0                                kubernetes 
kubeadm.x86_64                               1.18.9-0                                kubernetes 
kubeadm.x86_64                               1.18.10-0                               kubernetes 
kubeadm.x86_64                               1.18.12-0                               kubernetes 
kubeadm.x86_64                               1.18.13-0                               kubernetes 
kubeadm.x86_64                               1.18.14-0                               kubernetes 
kubeadm.x86_64                               1.18.15-0                               kubernetes 
kubeadm.x86_64                               1.18.16-0                               kubernetes 
kubeadm.x86_64                               1.18.17-0                               kubernetes 
kubeadm.x86_64                               1.18.18-0                               kubernetes 
kubeadm.x86_64                               1.18.19-0                               kubernetes 
kubeadm.x86_64                               1.18.20-0                               kubernetes 
kubeadm.x86_64                               1.19.0-0                                kubernetes 
kubeadm.x86_64                               1.19.1-0                                kubernetes 
kubeadm.x86_64                               1.19.2-0                                kubernetes 
kubeadm.x86_64                               1.19.3-0                                kubernetes 
kubeadm.x86_64                               1.19.4-0                                kubernetes 
kubeadm.x86_64                               1.19.5-0                                kubernetes 
kubeadm.x86_64                               1.19.6-0                                kubernetes 
kubeadm.x86_64                               1.19.7-0                                kubernetes 
kubeadm.x86_64                               1.19.8-0                                kubernetes 
kubeadm.x86_64                               1.19.9-0                                kubernetes 
kubeadm.x86_64                               1.19.10-0                               kubernetes 
kubeadm.x86_64                               1.19.11-0                               kubernetes 
kubeadm.x86_64                               1.19.12-0                               kubernetes 
kubeadm.x86_64                               1.19.13-0                               kubernetes 
kubeadm.x86_64                               1.19.14-0                               kubernetes 
kubeadm.x86_64                               1.19.15-0                               kubernetes 
kubeadm.x86_64                               1.19.16-0                               kubernetes 
kubeadm.x86_64                               1.20.0-0                                kubernetes 
kubeadm.x86_64                               1.20.1-0                                kubernetes 
kubeadm.x86_64                               1.20.2-0                                kubernetes 
kubeadm.x86_64                               1.20.4-0                                kubernetes 
kubeadm.x86_64                               1.20.5-0                                kubernetes 
kubeadm.x86_64                               1.20.6-0                                kubernetes 
kubeadm.x86_64                               1.20.7-0                                kubernetes 
kubeadm.x86_64                               1.20.8-0                                kubernetes 
kubeadm.x86_64                               1.20.9-0                                kubernetes 
kubeadm.x86_64                               1.20.10-0                               kubernetes 
kubeadm.x86_64                               1.20.11-0                               kubernetes 
kubeadm.x86_64                               1.20.12-0                               kubernetes 
kubeadm.x86_64                               1.20.13-0                               kubernetes 
kubeadm.x86_64                               1.20.14-0                               kubernetes 
kubeadm.x86_64                               1.20.15-0                               kubernetes 
kubeadm.x86_64                               1.21.0-0                                kubernetes 
kubeadm.x86_64                               1.21.1-0                                kubernetes 
kubeadm.x86_64                               1.21.2-0                                kubernetes 
kubeadm.x86_64                               1.21.3-0                                kubernetes 
kubeadm.x86_64                               1.21.4-0                                kubernetes 
kubeadm.x86_64                               1.21.5-0                                kubernetes 
kubeadm.x86_64                               1.21.6-0                                kubernetes 
kubeadm.x86_64                               1.21.7-0                                kubernetes 
kubeadm.x86_64                               1.21.8-0                                kubernetes 
kubeadm.x86_64                               1.21.9-0                                kubernetes 
kubeadm.x86_64                               1.21.10-0                               kubernetes 
kubeadm.x86_64                               1.21.11-0                               kubernetes 
kubeadm.x86_64                               1.21.12-0                               kubernetes 
kubeadm.x86_64                               1.21.13-0                               kubernetes 
kubeadm.x86_64                               1.21.14-0                               kubernetes 
kubeadm.x86_64                               1.22.0-0                                kubernetes 
kubeadm.x86_64                               1.22.1-0                                kubernetes 
kubeadm.x86_64                               1.22.2-0                                kubernetes 
kubeadm.x86_64                               1.22.3-0                                kubernetes 
kubeadm.x86_64                               1.22.4-0                                kubernetes 
kubeadm.x86_64                               1.22.5-0                                kubernetes 
kubeadm.x86_64                               1.22.6-0                                kubernetes 
kubeadm.x86_64                               1.22.7-0                                kubernetes 
kubeadm.x86_64                               1.22.8-0                                kubernetes 
kubeadm.x86_64                               1.22.9-0                                kubernetes 
kubeadm.x86_64                               1.22.10-0                               kubernetes 
kubeadm.x86_64                               1.22.11-0                               kubernetes 
kubeadm.x86_64                               1.22.12-0                               kubernetes 
kubeadm.x86_64                               1.22.13-0                               kubernetes 
kubeadm.x86_64                               1.22.14-0                               kubernetes 
kubeadm.x86_64                               1.22.15-0                               kubernetes 
kubeadm.x86_64                               1.22.16-0                               kubernetes 
kubeadm.x86_64                               1.22.17-0                               kubernetes 
kubeadm.x86_64                               1.23.0-0                                kubernetes 
kubeadm.x86_64                               1.23.1-0                                kubernetes 
kubeadm.x86_64                               1.23.2-0                                kubernetes 
kubeadm.x86_64                               1.23.3-0                                kubernetes 
kubeadm.x86_64                               1.23.4-0                                kubernetes 
kubeadm.x86_64                               1.23.5-0                                kubernetes 
kubeadm.x86_64                               1.23.6-0                                kubernetes 
kubeadm.x86_64                               1.23.7-0                                kubernetes 
kubeadm.x86_64                               1.23.8-0                                kubernetes 
kubeadm.x86_64                               1.23.9-0                                kubernetes 
kubeadm.x86_64                               1.23.10-0                               kubernetes 
kubeadm.x86_64                               1.23.11-0                               kubernetes 
kubeadm.x86_64                               1.23.12-0                               kubernetes 
kubeadm.x86_64                               1.23.13-0                               kubernetes 
kubeadm.x86_64                               1.23.14-0                               kubernetes 
kubeadm.x86_64                               1.23.15-0                               kubernetes 
kubeadm.x86_64                               1.23.16-0                               kubernetes 
kubeadm.x86_64                               1.23.17-0                               kubernetes 
kubeadm.x86_64                               1.24.0-0                                kubernetes 
kubeadm.x86_64                               1.24.1-0                                kubernetes 
kubeadm.x86_64                               1.24.2-0                                kubernetes 
kubeadm.x86_64                               1.24.3-0                                kubernetes 
kubeadm.x86_64                               1.24.4-0                                kubernetes 
kubeadm.x86_64                               1.24.5-0                                kubernetes 
kubeadm.x86_64                               1.24.6-0                                kubernetes 
kubeadm.x86_64                               1.24.7-0                                kubernetes 
kubeadm.x86_64                               1.24.8-0                                kubernetes 
kubeadm.x86_64                               1.24.9-0                                kubernetes 
kubeadm.x86_64                               1.24.10-0                               kubernetes 
kubeadm.x86_64                               1.24.11-0                               kubernetes 
kubeadm.x86_64                               1.24.12-0                               kubernetes 
kubeadm.x86_64                               1.24.13-0                               kubernetes 
kubeadm.x86_64                               1.24.14-0                               kubernetes 
kubeadm.x86_64                               1.24.15-0                               kubernetes 
kubeadm.x86_64                               1.24.16-0                               kubernetes 
kubeadm.x86_64                               1.24.17-0                               kubernetes 
kubeadm.x86_64                               1.25.0-0                                kubernetes 
kubeadm.x86_64                               1.25.1-0                                kubernetes 
kubeadm.x86_64                               1.25.2-0                                kubernetes 
kubeadm.x86_64                               1.25.3-0                                kubernetes 
kubeadm.x86_64                               1.25.4-0                                kubernetes 
kubeadm.x86_64                               1.25.5-0                                kubernetes 
kubeadm.x86_64                               1.25.6-0                                kubernetes 
kubeadm.x86_64                               1.25.7-0                                kubernetes 
kubeadm.x86_64                               1.25.8-0                                kubernetes 
kubeadm.x86_64                               1.25.9-0                                kubernetes 
kubeadm.x86_64                               1.25.10-0                               kubernetes 
kubeadm.x86_64                               1.25.11-0                               kubernetes 
kubeadm.x86_64                               1.25.12-0                               kubernetes 
kubeadm.x86_64                               1.25.13-0                               kubernetes 
kubeadm.x86_64                               1.25.14-0                               kubernetes 
kubeadm.x86_64                               1.26.0-0                                kubernetes 
kubeadm.x86_64                               1.26.1-0                                kubernetes 
kubeadm.x86_64                               1.26.2-0                                kubernetes 
kubeadm.x86_64                               1.26.3-0                                kubernetes 
kubeadm.x86_64                               1.26.4-0                                kubernetes 
kubeadm.x86_64                               1.26.5-0                                kubernetes 
kubeadm.x86_64                               1.26.6-0                                kubernetes 
kubeadm.x86_64                               1.26.7-0                                kubernetes 
kubeadm.x86_64                               1.26.8-0                                kubernetes 
kubeadm.x86_64                               1.26.9-0                                kubernetes 
kubeadm.x86_64                               1.27.0-0                                kubernetes 
kubeadm.x86_64                               1.27.1-0                                kubernetes 
kubeadm.x86_64                               1.27.2-0                                kubernetes 
kubeadm.x86_64                               1.27.3-0                                kubernetes 
kubeadm.x86_64                               1.27.4-0                                kubernetes 
kubeadm.x86_64                               1.27.5-0                                kubernetes 
kubeadm.x86_64                               1.27.6-0                                kubernetes 
kubeadm.x86_64                               1.28.0-0                                kubernetes 
kubeadm.x86_64                               1.28.1-0                                kubernetes 
kubeadm.x86_64                               1.28.2-0                                kubernetes 

5、在github中查看kube-prometheus和k8s对应的版本信息,

https://github.com/prometheus-operator/kube-prometheus

如下图
在这里插入图片描述
一步到位,把k8s升级到1.28版本
下文中本来想升级到1.27,结果系统自动默认升级到1.28了

[root@k8s-master ~]# yum install kubeadm-1.27.0-0.x86_64 -y  --disableexcludes=kubernetes
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
base                                                                     | 3.6 kB  00:00:00     
docker-ce-edge                                                           | 3.5 kB  00:00:00     
extras                                                                   | 2.9 kB  00:00:00     
kubernetes                                                               | 1.4 kB  00:00:00     
updates                                                                  | 2.9 kB  00:00:00     
正在解决依赖关系
--> 正在检查事务
---> 软件包 kubeadm.x86_64.0.1.18.0-0 将被 升级
---> 软件包 kubeadm.x86_64.0.1.27.0-0 将被 更新
--> 正在处理依赖关系 kubelet >= 1.19.0,它被软件包 kubeadm-1.27.0-0.x86_64 需要
--> 正在处理依赖关系 kubectl >= 1.19.0,它被软件包 kubeadm-1.27.0-0.x86_64 需要
--> 正在检查事务
---> 软件包 kubectl.x86_64.0.1.18.0-0 将被 升级
---> 软件包 kubectl.x86_64.0.1.28.2-0 将被 更新
---> 软件包 kubelet.x86_64.0.1.18.0-0 将被 升级
---> 软件包 kubelet.x86_64.0.1.28.2-0 将被 更新
--> 解决依赖关系完成依赖关系解决================================================================================================Package              架构                版本                    源                       大小
================================================================================================
正在更新:kubeadm              x86_64              1.27.0-0                kubernetes               11 M
为依赖而更新:kubectl              x86_64              1.28.2-0                kubernetes               11 Mkubelet              x86_64              1.28.2-0                kubernetes               21 M事务概要
================================================================================================
升级  1 软件包 (+2 依赖软件包)总计:42 M
总下载量:11 M
Downloading packages:
No Presto metadata available for kubernetes
5757b853af7b81f977d17812620d3eef53be41fb81b208b815a0dcb6a6ab2299-kubeadm |  11 MB  00:00:17     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在更新    : kubelet-1.28.2-0.x86_64                                                     1/6 正在更新    : kubectl-1.28.2-0.x86_64                                                     2/6 正在更新    : kubeadm-1.27.0-0.x86_64                                                     3/6 清理        : kubeadm-1.18.0-0.x86_64                                                     4/6 清理        : kubectl-1.18.0-0.x86_64                                                     5/6 清理        : kubelet-1.18.0-0.x86_64                                                     6/6 验证中      : kubectl-1.28.2-0.x86_64                                                     1/6 验证中      : kubeadm-1.27.0-0.x86_64                                                     2/6 验证中      : kubelet-1.28.2-0.x86_64                                                     3/6 验证中      : kubectl-1.18.0-0.x86_64                                                     4/6 验证中      : kubelet-1.18.0-0.x86_64                                                     5/6 验证中      : kubeadm-1.18.0-0.x86_64                                                     6/6 更新完毕:kubeadm.x86_64 0:1.27.0-0                                                                     作为依赖被升级:kubectl.x86_64 0:1.28.2-0                      kubelet.x86_64 0:1.28.2-0                     完毕!

6、重新加载重启集群

[root@k8s-master ~]# systemctl daemon-reload
[root@k8s-master ~]# systemctl restart kubelet
[root@k8s-master ~]# kubectl uncordon k8s-master
node/k8s-master uncordoned

7、查看集群节点状态,version为集群版本信息

[root@k8s-master ~]# kubectl get nodes
NAME         STATUS   ROLES    AGE     VERSION
k8s-master   Ready    master   5d23h   v1.18.0
k8s-slave1   Ready    <none>   4d11h   v1.18.0
k8s-slave2   Ready    <none>   4d11h   v1.18.0

8、查看集群所有的pod

[root@k8s-master ~]# kubectl get pods --all-namespaces
NAMESPACE      NAME                                         READY   STATUS    RESTARTS   AGE
default        nginx-5749bd847d-94zvw                       1/1     Running   3          2d1h
dev            nginx-755c49cf64-lbl25                       1/1     Running   3          2d
dev            nginx-755c49cf64-lj5nf                       1/1     Running   3          2d
dev            nginx-755c49cf64-pps2p                       1/1     Running   3          2d
kube-flannel   kube-flannel-ds-jpllk                        1/1     Running   6          4d11h
kube-flannel   kube-flannel-ds-md7hb                        1/1     Running   7          4d11h
kube-flannel   kube-flannel-ds-q428r                        1/1     Running   7          4d11h
kube-system    coredns-7ff77c879f-t4c9z                     1/1     Running   0          21m
kube-system    coredns-7ff77c879f-x5gc9                     1/1     Running   6          5d23h
kube-system    dashboard-metrics-scraper-6b4884c9d5-8cxd8   1/1     Running   5          4d8h
kube-system    etcd-k8s-master                              1/1     Running   7          5d23h
kube-system    kube-apiserver-k8s-master                    1/1     Running   7          5d23h
kube-system    kube-controller-manager-k8s-master           1/1     Running   8          5d23h
kube-system    kube-proxy-8m9lq                             1/1     Running   7          4d11h
kube-system    kube-proxy-jr72q                             1/1     Running   6          4d11h
kube-system    kube-proxy-kv9n5                             1/1     Running   7          5d23h
kube-system    kube-scheduler-k8s-master                    1/1     Running   8          5d23h
kube-system    kubernetes-dashboard-c98496485-ch4lw         1/1     Running   5          4d8h

都为Running,升级成功!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/219247.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

ActiveMQ使用指南

介绍 ActiveMQ是Apache开源组织旗下的一个项目&#xff0c;是一个流行的开源消息中间件。它完全支持JMS1.1和J2EE1.4规范的JMS Provider实现&#xff0c;并且是纯Java开发的产品。ActiveMQ支持多种语言编写客户端&#xff0c;包括C,C,C#,Perl,PHP,Ruby,Ajax等&#xff0c;同时…

做数据分析为何要学统计学(6)——什么问题适合使用卡方检验?

卡方检验作为一种非常著名的非参数检验方法&#xff08;不受总体分布因素的限制&#xff09;&#xff0c;在工程试验、临床试验、社会调查等领域被广泛应用。但是也正是因为使用的便捷性&#xff0c;造成时常被误用。本文参阅相关的文献&#xff0c;对卡方检验的适用性进行粗浅…

【unity】如何用Unity获取Windows桌面

【背景】 默认的Unity可实现的屏幕共享仅仅针对Unity编辑器的编辑窗口中的Camera展现的内容。本篇研究如何实现用Unity实时反映Windows桌面窗口画面。 【准备插件】 下载地址&#xff1a; https://download.csdn.net/download/weixin_41697242/88623496 将解压后的文件夹直…

Feign-自定义配置

目录 一、自定义Feign配置 二、修改日志级别 方式一&#xff1a;application配置文件方式 方式二&#xff1a;java代码方式 三、总结 一、自定义Feign配置 二、修改日志级别 配置Feign日志有两种方式 方式一&#xff1a;application配置文件方式 &#xff08;1&#xff09…

目标检测DOTA数据集提取感兴趣类别数据

DOTA数据集 DOTA数据集包含2806张航空图像&#xff0c;尺寸大约从800x800到4000x4000不等&#xff0c;包含15个类别共计188282个实例。其标注方式为四点确定的任意形状和方向的四边形&#xff08;区别于传统的对边平行bbox&#xff09;。类别分别为&#xff1a;plane, ship, s…

前端八股文

前端八股文 目录 前端八股文1.css选择优先级&#xff1f;2.px与rem区别&#xff1f;3.重绘与重排的区别&#xff1f;4.元素水平垂直居中的方法&#xff1f;5.什么是闭包&#xff0c;闭包有什么特点&#xff1f;6.什么是事件委托&#xff1f;7.什么是原型链&#xff1f;8.new操作…

交易历史记录20231205 记录

昨日回顾&#xff1a; select top 10000 * from dbo.CODEINFO A left join dbo.全部&#xff21;股20231205010101 B ON A.CODE B.代码 left join dbo.全部&#xff21;股20231205CONF D on A.CODED.代码left join dbo.全部&#xff21;股20231205 G on A.CODEG.代码 left…

LeetCode-合并有序链表问题

1.合并两个有序链表 题目描述&#xff1a; 将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 思路&#xff1a; 首先建立一个头节点方便后续操作&#xff0c;然后开始循环将两个链表的节点值进行比较&#xff0c;如果list1…

Windows Subsystem for Linux (WSL) 安装与使用笔记

文章目录 Part.I IntroductionPart.II 安装Chap.I 安装流程Chap.II 迁移至其他盘 Part.III 使用Chap.I 一些信息Chap.II 配置下载软件的源Chap.III 安装 pip Reference Part.I Introduction Windows Subsystem for Linux 简写为 WSL&#xff0c;是 Windows 的一个 Linux 子系统…

常用的建表但范式、反规范化

规范化&#xff1a; 规范化是用于数据库设计的一系列原理和技术&#xff0c;它可以减少表中数据的冗余&#xff0c;增加数据完整性和一致性。通常有很多范式。 第一范式&#xff08;1NF&#xff09;&#xff1a; 常用的三种范式&#xff1a; 表中的字段都是不可再分割的原子属…

蝴蝶Butterfly 数据集VOC+yolo-2000张(labelImg标注)

蝴蝶被誉为“会飞的花朵”&#xff0c;是一类非常美丽的昆虫。蝴蝶大多数体型属于中型至大型&#xff0c;翅展在15~260毫米之间&#xff0c;有2对膜质的翅。体躯长圆柱形&#xff0c;分为头、胸、腹三部分。体及翅膜上覆有鳞片及毛&#xff0c;形成各种色彩斑纹。今天要介绍的是…

算法导论复习(二)

算法导论第二次复习以 分治法 为专题 文章目录 分治算法是什么归并排序Strassen矩阵乘法最近点对 求解递推表达式 分治算法是什么 归并排序 代码如下&#xff1a; #include <iostream> #include <vector>using namespace std;// 归并函数&#xff0c;将两个有序数…

代码随想Day36 | 435. 无重叠区间、763.划分字母区间、56. 合并区间

435. 无重叠区间 这道题和前一天的射箭题目思想类似&#xff0c;用总区间个数-不重叠的区间个数等于需要去除的区间个数。首先对左边界排序&#xff0c;如果当前的左边界大于等于上一区间的右边界&#xff0c;则说明是一个不重叠的区间&#xff0c;否则&#xff0c;更新上一重…

Redis生产实战-热key、大key解决方案、数据库与缓存最终一致性解决方案

生产环境中热 key 处理 热 key 问题就是某一瞬间可能某条内容特别火爆&#xff0c;大量的请求去访问这个数据&#xff0c;那么这样的 key 就是热 key&#xff0c;往往这样的 key 也是存储在了一个 redis 节点中&#xff0c;对该节点压力很大 那么对于热 key 的处理就是通过热…

nginx 优化和安装防盗链以及实验举例

目录 nginx编译安装常用模块 生产中建议设置 nginx 内核限制文件优化 先将 nginx编译安装直至 systemctl命令使用 nginx服务 安全优化 隐藏 nginx版本号 查看版本号 隐藏版本信息 修改用户与组 限制单个 IP的访问频率和连接数 防盗链相关设置 在源主机里配置防盗链 …

【C++11】右值引用与移动语义

一.左值与右值 左值&#xff1a;可以取地址的表示数据的表达式&#xff0c;左值可以出现在赋值符号左边 右值&#xff1a;不能取地址的表示数据的表达式&#xff0c;右值不能出现在赋值符号左边 int fun() {return 0; } int main() {int a 0;//a->左值const int b 1;//b-&…

【lesson14】MySQL表的基本查询(1)

文章目录 表的基本操作介绍retrieveselect列建表基本测试 where子句建表基本测试 表的基本操作介绍 CRUD : Create(创建), Retrieve(读取)&#xff0c;Update(更新)&#xff0c;Delete&#xff08;删除&#xff09; retrieve select列 建表 基本测试 插入数据 全列查询 …

2023年度影响力出海品牌传音移动互联:开放合作 赋能更多中国企业高效出海

伴随着全球化的脚步&#xff0c;出海成为许多中国企业的“必选项”&#xff0c;与之配套的出海服务相关业务也得到了极大的发展。近日&#xff0c;第五届鲸鸣奖颁奖典礼上&#xff0c;传音移动互联凭借为企业提供高效优质的出海解决方案&#xff0c;荣获鲸鸣奖“2023年度影响力…

SpringBoot 引入nacos 【最新 | 可运行】

SpringBoot 引入nacos 首先要了解在 Springboot 中只支持那些 Springboot 的版本&#xff08;我真的被这个搞死了&#xff09;,可以如下图参考&#xff1a; 下面我们就开始吧 下载 Nacos nacos 下载地址&#xff0c;这里可以选择你要下载的版本&#xff0c;我选择下载了2.2.…

[c]零钱兑换

题目比较简单&#xff0c;看答案就能看懂什么意思 #include<stdio.h> int main() {int count 0;int n;scanf("%d", &n);for (int i 0; i < n; i){for (int k 0; k <n/2; k){for (int j 0; j < n/5 ; j){if (i 2 * k 5 * j n){count;}}}}p…