Nimesh Kumar:
how can we get the kube scheduler logs and the controller manager logs on a k8s cluster?
Justin Toh:
I’m guessing it’s
kubectl logs --selector component=kube-scheduler
kubectl logs --selector component=kube-controller-manager
If you want both at the same time:
kubectl logs --prefix --selector 'component in (kube-scheduler, kube-controller-manager)'
Nimesh Kumar:
Thanks @Justin Toh
How do we get the worker node or a master cluster?
What do we do in case we dont have jounalctl on the cluster?
Justin Toh:
Are these follow up questions to the previous question on logs or totally unrelated?
Justin Toh:
1A. If you just want to list master nodes:
kubectl get nodes -l <http://node-role.kubernetes.io/master|node-role.kubernetes.io/master>
1B. If you just want to list worker nodes:
kubectl get nodes -l <http://node-role.kubernetes.io/master!=|node-role.kubernetes.io/master!=>
- Haven’t learnt this yet lol