Kubernetes: No Route to Host
I encountered the same issue and resolved it by running the commands below:
iptables --flushiptables -tnat --flushsystemctl stop firewalldsystemctl disable firewalldsystemctl restart docker
for me the the solution was to modify the rules in iptables as described here
sudo iptables -D INPUT -j REJECT --reject-with icmp-host-prohibitedsudo iptables -D FORWARD -j REJECT --reject-with icmp-host-prohibited
When you are using kubectl proxy
, by default you should use 127.0.0.1:8001
as HTTP Kube API URL. Your requests to http://127.0.0.1:8001
are then augmented with authentication headers and passed to API server. Thus you should try http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/toned-gecko-grafana:80/proxy/
rather then with https and api ip
Also, make sure you have socat installed on kube nodes.