1.查看组件状态
[root@k8s-master-01 ~]# kubectl get cs
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME STATUS MESSAGE ERROR
controller-manager Unhealthy Get "http://127.0.0.1:10252/healthz": dial tcp 127.0.0.1:10252: connect: connection refused
scheduler Unhealthy Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10251: connect: connection refused
2.注释掉 # --port=0
[root@k8s-master-01 ~]# vim /etc/kubernetes/manifests/kube-scheduler.yaml
[root@k8s-master-01 ~]# vim /etc/kubernetes/manifests/kube-controller-manager.yaml
# - --port=0