Kubernetes版本升级到v1.18.0方法

news2024/11/22 20:52:21

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

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

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

相关文章

Tomcat部署Activiti官方 流程设计器【数据库更换为Mysql !!!】

一、官网下载activiti6 解压后结构如下: database&#xff1a; 存放数据库对象相关脚本&#xff0c;包含不同的数据库脚本 libs&#xff1a; 包含activiti开发过程中需要用到的jar包和源码&#xff0c;不建议通过jar包直接引用&#xff0c;建议通过maven进行管理 wars&am…

opencv 十五 红外图像中虹膜的提取

一、算法需求 在医疗检测中&#xff0c;需要使用红外相机拍摄眼睛照片&#xff0c;然后提取出虹膜的区域。在拍摄过程瞳孔需要进行运动&#xff0c;其通常不在正前方&#xff0c;无法形成圆形&#xff0c;不能使用常规的霍夫圆检测进行提取定位。且在在红外图像中&#xff0c;…

数据结构和算法 - 前置扫盲

数据结构和算法 一、前置扫盲 1、数据结构分类 1.1 逻辑结构&#xff1a;线性与非线性 tip&#xff1a;逻辑结构揭示了数据元素之间的逻辑关系。 线性数据结构&#xff1a;元素间存在明确的顺序关系。 数据按照一定顺序排列&#xff0c;其中元素之间存在一个对应关系&#x…

第二百零四回 模拟对话窗口的页面

文章目录 1. 概念介绍2. 思路与方法2.1 实现思路2.2 实现方法 3. 示例代码4. 经验分享5. 内容总结 我们在上一章回中介绍了"修改组件风格的另外一种方法"相关的内容&#xff0c;本章回中将介绍" 如何做一个模拟对话框窗口的页面".闲话休提&#xff0c;让我…

PCL点云处理之判断某一点在三角形的内部、外部、还是边上(二百二十二)

PCL点云处理之判断某一点在三角形的内部、外部、还是边上(二百二十二) 一、算法介绍二、算法实现1.代码2.结果一、算法介绍 点与三角形的位置共有三种: 1 内部 2 外部 3 点刚好在边上 (这个判断还是很有必要的,应用广泛,下面代码复制粘贴即可使用,纯C++实现) 二、算…

模块一——双指针:18.四数之和

文章目录 题目描述算法原理排序双指针 代码实现排序双指针复杂度分析时间复杂度&#xff1a;O(N^3^)空间复杂度&#xff1a;O(log⁡N)或者O(N) 题目描述 题目链接&#xff1a;18.四数之和 算法原理 排序双指针 依次固定⼀个数a &#xff1b;在这个数a 的后⾯区间上&#x…

点云几何 之 计算二维平面某一点到直线的距离(2)

点云几何 之 计算二维平面某一点到直线的距离&#xff08;2&#xff09; 一、算法介绍.二、算法实现1.代码2.结果 总结 一、算法介绍. 计算某一点到直线的距离&#xff0c;这里的直线会用2个点来表示&#xff0c;如果你只有直线上一点和直线的方向向量&#xff0c;应该也可以转…

yo!这里是Linux信号相关介绍

目录​​​​​​​ 前言 基本介绍 概念 信号列表 信号处理 产生(发送)信号 通过按键产生 系统函数产生 软件条件产生 硬件异常产生 阻塞信号 信号状态 sigset_t 状态相关函数 1.sigprocmask 2.sigpending 捕捉信号 内核态与用户态 捕捉过程 sigaction 后…

1.4 Postman的安装

hello大家好&#xff0c;本小节我们来安装一下Postman&#xff0c;好为我们后续的测试工作做准备。 首先&#xff0c;打开Postman的官网Postman API Platform 然后根据同学们自己电脑的操作系统来下载对应的Postman安装包。我这里拿windows来举例。我们点击windows的图标 会跳…

深入解析Freemarker模板引擎及其在Spring Boot中的高级整合

目录 引言1. Freemarker1.1.什么是Freemarker1.2 Freemarker模板组成部分1.3.优点 2. Spring Boot整合Freemarker2.1 配置2.2 数据类型 3. 案例总结 引言 Freemarker作为一款强大的模板引擎&#xff0c;与Spring Boot的整合能够极大地提升Web应用的开发效率和灵活性。本篇博客…

2023 巅峰之作 | AIGC、AGI、GhatGPT、人工智能大语言模型的崛起与挑战

文章目录 01 《ChatGPT 驱动软件开发》内容简介 02 《ChatGPT原理与实战》内容简介 03 《神经网络与深度学习》04 《AIGC重塑教育》内容简介 05 《通用人工智能》目  录 2023年是人工智能大语言模型大爆发的一年&#xff0c;一些概念和英文缩写也在这一年里集中出现&#xff…

你都那么老了,还在每天写博客吗?

关注卢松松&#xff0c;会经常给你分享一些我的经验和观点。 白色便民网&#xff1a;我想多开一个公司会不会被税局查? 事件背景&#xff1a; 松松已创业9年&#xff0c;自媒体14年&#xff0c;经历过从0开公司、项目失败、赚钱等各种高光时刻。所以对于小微企业经营还是…

aardio网页组件:webPageOperation

webPageOperation是webview的初步封装&#xff0c;用来网页填表、操作网页。可操作web.form、web.view、web.view2等浏览器组件。 使用方法 首先把webPageOperation.aardio&#xff08;源码在后面&#xff09;放到~\lib\godking目录下&#xff0c;然后新建窗口项目&#xff…

[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…

R2O语义分割: Refine and Represent: Region-to-Object Representation Learning

paper: arxiv.org/pdf/2208.11821v2.pdf repo link: KKallidromitis/r2o: PyTorch implementation of Refine and Represent: Region-to-Object Representation Learning. (github.com) 摘要&#xff1a; 在本文中提出了区域到对象表示学习&#xff08;Region-to-Object Rep…

windows10下jdk安装

文章目录 windows10下jdk安装说明what安装包下载执行安装包验证是否安装成功 windows10下jdk安装 说明 操作系统&#xff1a;windows10 版本&#xff1a;1.8 what JDK(Java Development Kit) 是 Java 语言的软件开发工具包 安装包下载 https://www.oracle.com/java/techn…

4.11 构建onnx结构模型-Clip

前言 构建onnx方式通常有两种&#xff1a; 1、通过代码转换成onnx结构&#xff0c;比如pytorch —> onnx 2、通过onnx 自定义结点&#xff0c;图&#xff0c;生成onnx结构 本文主要是简单学习和使用两种不同onnx结构&#xff0c; 下面以 Clip 结点进行分析 方式 方法一…

下一站 Gen AI 城市巡展指南来了!“码”上出发,Let‘s 构!

亚马逊云科技开发者社区为开发者们提供全球的开发技术资源。这里有技术文档、开发案例、技术专栏、培训视频、活动与竞赛等。帮助中国开发者对接世界最前沿技术&#xff0c;观点&#xff0c;和项目&#xff0c;并将中国优秀开发者或技术推荐给全球云社区。如果你还没有关注/收藏…

【Java用法】Hutool树结构工具-TreeUtil快速构建树形结构的两种方式 + 数据排序

Hutool树结构工具-TreeUtil快速构建树形结构的两种方式 数据排序 一、业务场景二、Hutool官网树结构工具2.1 介绍2.2 使用2.2.1 定义结构2.2.2 构建Tree2.2.3 自定义字段名 2.3 说明 三、具体的使用场景3.1 实现的效果3.2 业务代码3.3 实现自定义字段的排序 四、踩过的坑4.1 坑…

Android studio如何安装ai辅助工具

引言 在没有翻墙的情况下&#xff0c;即单纯在公司打工&#xff0c;经测试&#xff0c;大部分ai工具都是使用不了的&#xff08;比如各种gpt,codeium,copilot&#xff09;&#xff0c;根本登录不了账号&#xff0c;但有一个国内的codegeex是可以使用的&#xff0c;在这里不对各…