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 M
 kubelet              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,升级成功!

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

js Array.every()的使用

2023.12.13今天我学习了如何使用Array.every()的使用&#xff0c;这个方法是用于检测数组中所有存在的元素。 比如我们需要判断这个数组里面的全部元素是否都包含张三&#xff0c;可以这样写&#xff1a; let demo [{id: 1, name: 张三}, {id: 2, name: 张三五}, {id: 3, name…

物奇平台MIC配置与音频通路关系

物奇平台MIC配置与音频通路关系 是否需要申请加入数字音频系统研究开发交流答疑群(课题组)&#xff1f;可加我微信hezkz17, 本群提供音频技术答疑服务&#xff0c;群赠送语音信号处理降噪算法&#xff0c;蓝牙耳机音频&#xff0c;DSP音频项目核心开发资料, 1 255代表无效&am…

第31期 | GPTSecurity周报

GPTSecurity是一个涵盖了前沿学术研究和实践经验分享的社区&#xff0c;集成了生成预训练Transformer&#xff08;GPT&#xff09;、人工智能生成内容&#xff08;AIGC&#xff09;以及大型语言模型&#xff08;LLM&#xff09;等安全领域应用的知识。在这里&#xff0c;您可以…

电子学会C/C++编程等级考试2022年12月(五级)真题解析

C/C++等级考试(1~8级)全部真题・点这里 第1题:漫漫回国路 2020年5月,国际航班机票难求。一位在美国华盛顿的中国留学生,因为一些原因必须在本周内回到北京。现在已知各个机场之间的航班情况,求问他回不回得来(不考虑转机次数和机票价格)。 时间限制:1000 内存限制:655…

CTD测试流程

连接 连接17Plus&#xff0c;用usb转232线&#xff0c;db9公针2、3分别接Data I/O的2、3。DB9的5接Data I/O的1。尼龙塞子打开状态。不用闭合。 软件连接 打开SeaTermAF V2&#xff0c;注意打开前先把串口插上&#xff0c;否则软件读不到串口。如果读不到&#xff0c;就在插…

攻防世界-web-upload

1. 题目描述 打开链接&#xff0c;是这样的一个注册界面 先试着注册一个账号看看&#xff0c;这里简单操作&#xff0c;注册test/test&#xff0c;注册完后进行登录 登录成功后进入到这样一个文件上传界面。当前从界面上得到的信息暂时就是这些了。 2. 思路分析 既然存在上传…

基于FFmpeg,实现播放器功能

一、客户端选择音视频文件 MainActivity package com.anniljing.ffmpegnative;import android.Manifest; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Ur…

sentinel整合nacos配置中心持久化

在网上找了很多的资料&#xff0c;发现sentinel整合nacos持久化的博文和视频大多数都只有改造限流部分的教程&#xff0c;并且都需要修改前端&#xff0c;略显麻烦&#xff0c;至于剩下的熔断、热点流控、授权的更是没有相关的改造教程&#xff0c;最后在知乎的看到一篇文章后让…

表单参数绑定(如何解决一个输入框绑定两个参数)

表单参数绑定(如何解决一个输入框绑定两个参数) 问题复现 <el-form-item label"会议编号" prop"meetingNum"><el-select v-model"form.meetingNum" placeholder"请选择会议编号" style"width: 100%;":disabled&quo…

selenium+python自动化测试 —— 解决无法启动IE浏览器及报错问题!

前言&#xff1a;记录启动IE浏览器的报错及解决方法。 错误1&#xff1a; selenium.common.exceptions.WebDriverException: Message: IEDriverServer.exe executable needs to be in PATH. Please download from http://selenium-release.storage.googleapis.com/index.html…

SQL Server 服务启动报错:错误1069:由于登录失败而无法启动服务

现象 服务器异常关机以后&#xff0c;SQL Server服务无法启动了。 启动服务时报错&#xff1a; 错误1069:由于登录失败而无法启动服务 解决办法 我的电脑–控制面板–管理工具–服务–右键MSSQLSERVER–属性–登录–登陆身份–选择"本地系统帐户" 设置完成后&am…

springboot整合日志框架log4j2

springboot整合日志框架log4j2 前言&#xff1a;springboot提供了默认的日志框架logback&#xff0c;结合slf4j门面&#xff0c;基于简单配置即可实现日志输出记录。但是实际开发中很多项目会使用log4j2&#xff0c;log4j2是log4j的升级版本&#xff0c;性能和安全性上比log4j…

【视觉SLAM十四讲学习笔记】第四讲——指数映射

专栏系列文章如下&#xff1a; 【视觉SLAM十四讲学习笔记】第一讲——SLAM介绍 【视觉SLAM十四讲学习笔记】第二讲——初识SLAM 【视觉SLAM十四讲学习笔记】第三讲——旋转矩阵 【视觉SLAM十四讲学习笔记】第三讲——旋转向量和欧拉角 【视觉SLAM十四讲学习笔记】第三讲——四元…

ffmpeg编解码——数据包(packet)概念(如何正确处理数据包中的显示时间戳pts与解码时间戳dts关系?)

文章目录 FFmpeg编解码——数据包&#xff08;Packet&#xff09;概念1. 数据包&#xff08;Packet&#xff09;简介2. 数据包&#xff08;Packet&#xff09;在FFmpeg中的应用2.1 从媒体文件读取数据包2.2 向媒体文件写入数据包 3. 数据包&#xff08;Packet&#xff09;相关问…

C语言指针基础题(二)

目录 例题一题目解析及答案 例题二题目解析及答案 例题三题目解析及答案 例题四题目解析及答案 例题五题目解析及答案 感谢各位大佬对我的支持,如果我的文章对你有用,欢迎点击以下链接 &#x1f412;&#x1f412;&#x1f412; 个人主页 &#x1f978;&#x1f978;&#x1f…

使用Microsoft Dynamics AX 2012 - 8. 财务管理

财务管理的主要职责是控制和分析与货币金额有关的所有交易。这些事务发生在整个组织的业务流程中。 因此&#xff0c;财务管理是企业管理解决方案的核心领域。在Dynamics AX中&#xff0c;支持所有部门业务流程的应用程序的深度集成可立即提供准确的财务数据。 分类账交易的原…

SQL小技巧3:分层汇总

前几天&#xff0c;QQ学习群有个小伙伴问我一个使用SQL分层汇总的问题。 今天正好分享下。 需求描述 在数据报表开发的工作中&#xff0c;经常会遇到需要对数据进行分组汇总的情况。 假设有一个销售数据表sales&#xff0c;包含列region&#xff08;地区&#xff09;、mont…

验收支撑-软件项目验收计划书

软件项目验收计划的作用主要有以下几点&#xff1a; 确保项目质量&#xff1a;通过项目验收&#xff0c;客户或相关方可以对项目的成果进行全面、系统的评估&#xff0c;以确保项目达到预期的质量标准。发现和解决问题&#xff1a;在项目开发过程中&#xff0c;难免会存在一些问…

SpringBoot程序打包失败处理

&#x1f648;作者简介&#xff1a;练习时长两年半的Java up主 &#x1f649;个人主页&#xff1a;程序员老茶 &#x1f64a; ps:点赞&#x1f44d;是免费的&#xff0c;却可以让写博客的作者开心好久好久&#x1f60e; &#x1f4da;系列专栏&#xff1a;Java全栈&#xff0c;…

产品入门第三讲:Axure产品流程图绘制

&#x1f4da;&#x1f4da; &#x1f3c5;我是默&#xff0c;一个在CSDN分享笔记的博主。&#x1f4da;&#x1f4da; ​​​​​ &#x1f31f;在这里&#xff0c;我要推荐给大家我的专栏《Axure》。&#x1f3af;&#x1f3af; &#x1f680;无论你是编程小白&#xff0c;还…