Closed radouani1984 closed 2 years ago
Try to check out the logs in /var/log/syslog and service status
$ sudo systemctl status kube-controller-manager.service
$ sudo systemctl status kube-scheduler
$ sudo tail -n50 /var/log/syslog
Make sure the kubeconfig file used for both the kube-controller-manager and the kube-scheduler have a "current-context" set.
Following the guide and according to the documentation, the following command should do:
sudo kubectl config --kubeconfig=/var/lib/kubernetes/_path/to/_kube-controller-manager.kubeconfig use-context default (The same should be done for the kube-scheduler.kubeconfig and the admin.kubeconfig, though, if you were able to check the status means that the admin has a default set)
Leaving it here in case someone is facing the error "invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable.
Otherwise, if that is not the error, check the logs by using the command: systemctl -u kube-controller-manager Then pressing [Shift + G] to go to the last line.
~Was able to get the kube-controller-manager service running by adding the following flag to the service unit file:~
~--master=127.0.0.1:6443~
~(if adding to the /etc/systemd/system/kube-controller-manager.service file, and it is not the last argument, remember to add the trailing back-slash if keeping it organized by splitting it into different lines. That is: --master=127.0.0.1:6443~ \
~As for the case of the kube-scheduler service, found in the documentation that the --kubeconfig flag has been deprecated and --config is to be used instead.~
~However, the above for the kube-scheduler service didn't work. Adding the --master flag did. Though, unsure if the kubeconfig file will be ignore entirely or just the master address.~
this link helped me https://github.com/mmumshad/kubernetes-the-hard-way/issues/66
Hi @radouani1984 @kilyes @willie-cadete
We have now merged a major change to bring this to v1.24. Many issues have been addressed as part of the upgrade. Please try it now and feel free to raise further issues.
Thanks.
Hello, I have installed the controller services as described in the document. However, I got an error when I attempted to check the status of the services.
vagrant@master-1:~$ kubectl get componentstatuses --kubeconfig admin.kubeconfig
Output
The same error goes for the master-2. Any idea how to resolve this issue? Thanks