systemctl status kube-apiserver systemctl status kube-scheduler systemctl status kube-controller-manager systemctl status kubelet systemctl status kube-proxy kubectl get cs
systemctl status kubelet systemctl status kube-proxy
验证升级是否成功
# 查看集群状态 [root@master1 bin]# kubectl cluster-info Kubernetes control plane is running at https://192.168.1.120:6443 CoreDNS is running at https://192.168.1.120:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
[root@master1 bin]# kubectl get node NAME STATUS ROLES AGE VERSION master1 Ready <none> 42h v1.20.3 master2 Ready <none> 23h v1.20.0 node1 Ready <none> 41h v1.20.3 node2 Ready <none> 41h v1.20.3
[root@master1 bin]# kubectl get cs Warning: v1 ComponentStatus is deprecated in v1.19+ NAME STATUS MESSAGE ERROR controller-manager Healthy ok scheduler Healthy ok etcd-1 Healthy {"health":"true"} etcd-2 Healthy {"health":"true"} etcd-0 Healthy {"health":"true"}
[root@master1 bin]# kubectl get pod -n kube-system NAME READY STATUS RESTARTS AGE calico-kube-controllers-97769f7c7-rc9jg 1/1 Running 0 42h calico-node-fw9fv 1/1 Running 0 42h calico-node-q2f2w 1/1 Running 0 23h calico-node-rlzg9 1/1 Running 0 41h calico-node-v9nhl 1/1 Running 0 42h coredns-6cc56c94bd-nr96k 1/1 Running 0 41h
# 验证coredns解析 [root@master1 bin]# kubectl run -it --rm dns-test --image=busybox:1.28.4 sh If you don't see a command prompt, try pressing enter. / # nslookup kubernetes Server: 10.0.0.2 Address 1: 10.0.0.2 kube-dns.kube-system.svc.cluster.local