I was installing the control plane components according the video https://kodekloud.com/courses/539883/lectures/9808335
But I have found this error when i was trying to know the component status
vagrant@master-1:~$ kubectl get componentstatuses --kubeconfig admin.kubeconfig
The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?
Meanwhile i have inspected the systemd logs and I could see this message:
Jun 14 08:58:44 master-1 kube-controller-manager: E0614 08:58:44.825913 3663 leaderelection.go:320] error retrieving resource lock kube-system/kube-controller-manager: Get https://127.0.0.1:6443/api/v1/namespaces/kube-system/endpoints/kube-controller-manager?timeout=10s: dial tcp 127.0.0.1:6443: connect: connection refused
Jun 14 08:58:45 master-1 kube-scheduler: E0614 08:58:45.114131 3671 reflector.go:178] k8s.io/client-go/informers/factory.go:135: Failed to list *v1.Node: Get https://127.0.0.1:6443/api/v1/nodes?limit=500&resourceVersion=0: dial tcp 127.0.0.1:6443: connect: connection refused
Jun 14 08:58:46 master-1 systemd: kube-apiserver.service: Service hold-off time over, scheduling restart.
Jun 14 08:58:46 master-1 systemd: kube-apiserver.service: Scheduled restart job, restart counter is at 1939.
Jun 14 08:58:46 master-1 systemd: Stopped Kubernetes API Server.
The API Server is not running correctly.
Shall anybody help me, please?