After installing the kubernetes cluster, after this guide, I decided to check the system pod kube-scheduler logs to make sure everything was working fine:
kubectl logs --namespace kube-system kube-scheduler-user223225-pc
but I got the following error message:
Error from server: Get https://10.2.2.131:10250/containerLogs/kube-system/kube-scheduler-user-pc/kube-scheduler: dial tcp 10.2.2.131:10250: getsockopt: no route to host
I am trying to get the logs from other containers and got the same error.
I start the cluster on Ubuntu 16.04 and select the flannel network using the following commands:
kubectl taint nodes --all node-role.kubernetes.io/master- kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml kubectl create --namespace kube-system -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Maybe I missed something, I also see that people are offering to set up a firewall, but this did not help me:
sudo systemctl stop kubelet sudo systemctl stop docker sudo ifconfig cni0 down sudo ifconfig flannel.1 down sudo ifconfig docker0 down sudo service docker start sudo service kubelet start sudo iptables -A FORWARD -i cni0 -j ACCEPT sudo iptables -A FORWARD -o cni0 -j ACCEPT
Does anyone know how to fix the issue with getting logs? Thank you in advance.
Kirill Liubun
source share