Rancher 2.1.1 with Canonicol Kubernetes, no joy

Ok so not sure if this is a Rancher or a Juju deployed kubernetes problem. But as I am trying to connect Rancher with the Kube Cluster I am asking here first.

Ok I have deployed a simple unmodified Kubernetes Cluster with Ubuntu’s Juju. this seems to work I can connect to it and all seems ok.

So as my requirment is to mange this cluster wwith Rancher , as I prefer the UI over the Kube UI, I wanted to just add it to my Rancher installation as an excisting Kube cluster.

This starts working fine up to the point that I see the following :

$ kubectl get pods
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-78987bb9d4-q6lbp 0/1 CrashLoopBackOff 49 3h
cattle-node-agent-mfvb6 0/1 CrashLoopBackOff 49 3h
cattle-node-agent-nd7m2 0/1 CrashLoopBackOff 49 3h
cattle-node-agent-qmgml 0/1 CrashLoopBackOff 49 3h

$ kubectl logs -f cattle-cluster-agent-78987bb9d4-q6lbp
INFO: Environment: CATTLE_ADDRESS=10.1.30.3 CATTLE_CA_CHECKSUM=123456789 CATTLE_CLUSTER=true CATTLE_INTERNAL_ADDRESS= CATTLE_K8S_MANAGED=true CATTLE_NODE_NAME=cattle-cluster-agent-78987bb9d4-q6lbp CATTLE_SERVER=https://rancher-v2.labs.company.lan
INFO: Using resolv.conf: nameserver 10.152.183.122 search cattle-system.svc.cluster.local svc.cluster.local cluster.local options ndots:5
ERROR: https://rancher-v2.labs.company.lan/ping is not accessible (Failed to connect to rancher-v2.labs.company.lan port 443: No route to host)

$ kubectl logs -f cattle-node-agent-mfvb6
INFO: Environment: CATTLE_ADDRESS=172.30.4.148 CATTLE_AGENT_CONNECT=true CATTLE_CA_CHECKSUM=1234567 CATTLE_CLUSTER=false CATTLE_INTERNAL_ADDRESS= CATTLE_K8S_MANAGED=true CATTLE_NODE_NAME=juju-f32662-1 CATTLE_SERVER=https://rancher-v2.labs.company.lan
INFO: Using resolv.conf: nameserver 10.26.25.39 nameserver 172.16.1.39
ERROR: https://rancher-v2.labs.company.lan/ping is not accessible (Failed to connect to rancher-v2.labs.company.lan port 443: No route to host)

Now I can actually ping and curl the URL from the Kube nodes so the no route to host is getting me here.

Anyone have an idea what is up here where did I go wrong or am I hitting some obscure bug or ?

It seems to me DNS is the issue and it seems to try to connect using the Flannel network instead of the physical but not sure…