0

I installed a kubernetes cluster with k3sup on a VM on my local hypervisor and the pods are up and running. Now I wanted to add a deployment with rancher in its latest version (2.6) to manage another cluster according to this guide. But the DNS and IP return a 404 not found.

Here are some terminal commands with results that might help.

$kubectl -n cattle-system get deploy rancher
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
rancher   3/3     3            3           5d3h

$kubectl get pods -n cattle-system -o wide
NAME                               READY   STATUS    RESTARTS   AGE     IP           NODE          NOMINATED NODE   READINESS GATES
rancher-webhook-7f84b74ddb-44449   1/1     Running   1          5d20h   10.42.0.44   k8s-rancher   <none>           <none>
rancher-87d4dc99d-94hqb            1/1     Running   20         5d20h   10.42.0.42   k8s-rancher   <none>           <none>
rancher-87d4dc99d-b5fm2            1/1     Running   17         5d20h   10.42.0.45   k8s-rancher   <none>           <none>
rancher-87d4dc99d-dxmfl            1/1     Running   17         5d20h   10.42.0.41   k8s-rancher   <none>           <none>

The many restarts come from the missing connection to the websocket, I think.

$kubectl -n cattle-system logs rancher-87d4dc99d-94hqb
... [repeating the connection failure on all 3 pods]
2021/10/04 23:29:13 [ERROR] Failed to connect to peer wss://10.42.0.45/v3/connect [local ID=10.42.0.42]: dial tcp 10.42.0.45:443: connect: no route to host

In the container I can not reach the IP of another server.

$kubectl exec --stdin -n cattle-system --tty rancher-87d4dc99d-94hqb -- /bin/bash
[in the container]$ curl 10.42.0.45
curl: (7) Failed to connect to 10.42.0.45 port 80: No route to host

What can I do to get it working? Thanks in advance for the help.

RUFmord
  • 19
  • 4
  • With that amount of troubleshooting detail, I'm not sure what value you are expecting the Internet to offer you. What is 10.42.0.45? Can everything except your sekrit pod named `xxxx1` reach it? Can your Node? Do you have CNI running successfully? Are the **20** restarts indicative of cluster starvation? Good luck with your question – mdaniel Oct 05 '21 at 01:55
  • Could you please answer mdaniel's questions? What version of Rancher do you have ? Can you use the commands/steps listed on [this page](https://rancher.com/docs/rancher/v2.5/en/troubleshooting/networking/) to check networking related issues in your cluster ? – matt_j Oct 05 '21 at 10:03
  • Hello @RUFmord. Any updates? – Wytrzymały Wiktor Oct 07 '21 at 12:51
  • 1
    Thank you for your help. You asked the right questions that helped me solve it. The first problem was, that I forgot to open some ports in the firewalls of the machines. So I did that, it solved the connection errors. The second thing was, that I entered the domain name of the rancher server, which gave me 404. If typing the FQDN it works. – RUFmord Oct 08 '21 at 17:32

1 Answers1

0

As the problem has already been resolved in the comments section, I decided to provide a Community Wiki answer just for better visibility to other community members.

The commands/steps listed on this page are really useful for checking network related issues in the cluster.

First, I recommend checking that all the required ports are open in your (host) firewall as described here.

matt_j
  • 350
  • 2
  • 6