https://rancher.com/ logo
#general
Title
# general
h

helpful-summer-57996

03/06/2023, 3:23 PM
Hi all, Ive been researching rancher for a few days now, I want to use rancher for a POC of an on-prem self provisioned kubernetes. I installed rancher on an EKS cluster, Now im trying trying to add the existing cluster I provisioned on the same VPC (so there is connection). Is it possible todo so using
Direct connect
by giving rancher the kubeconfig of the existing cluster?
a

agreeable-oil-87482

03/06/2023, 6:42 PM
You can import existing clusters, rancher will generate a kubectl command for you to run on the downstream cluster.
h

helpful-summer-57996

03/07/2023, 8:39 AM
@agreeable-oil-87482 clusters that are not: GKE, EKS or AKS ? If so, how to do so?
a

agreeable-oil-87482

03/07/2023, 8:45 AM
Import > Generic
h

helpful-summer-57996

03/07/2023, 12:31 PM
Thanks a lot @agreeable-oil-87482 found the commands, though im getting a
Waiting
state,
Waiting for API to be available
agent is running for 20 mins. now
a

agreeable-oil-87482

03/07/2023, 12:49 PM
Can you grab the logs from the agent?
h

helpful-summer-57996

03/07/2023, 12:56 PM
Copy code
➜  aws-kubespray git:(feature/V2.20-jenkins) ✗ kl cattle-cluster-agent-6df659fdd9-r66nt
INFO: Environment: CATTLE_ADDRESS=10.233.125.6 CATTLE_CA_CHECKSUM=efe245eb85339d5b4e41099cf06e106c042b561f999f46582a14ecd30764347c CATTLE_CLUSTER=true CATTLE_CLUSTER_AGENT_PORT=<tcp://10.233.44.247:80> CATTLE_CLUSTER_AGENT_PORT_443_TCP=<tcp://10.233.44.247:443> CATTLE_CLUSTER_AGENT_PORT_443_TCP_ADDR=10.233.44.247 CATTLE_CLUSTER_AGENT_PORT_443_TCP_PORT=443 CATTLE_CLUSTER_AGENT_PORT_443_TCP_PROTO=tcp CATTLE_CLUSTER_AGENT_PORT_80_TCP=<tcp://10.233.44.247:80> CATTLE_CLUSTER_AGENT_PORT_80_TCP_ADDR=10.233.44.247 CATTLE_CLUSTER_AGENT_PORT_80_TCP_PORT=80 CATTLE_CLUSTER_AGENT_PORT_80_TCP_PROTO=tcp CATTLE_CLUSTER_AGENT_SERVICE_HOST=10.233.44.247 CATTLE_CLUSTER_AGENT_SERVICE_PORT=80 CATTLE_CLUSTER_AGENT_SERVICE_PORT_HTTP=80 CATTLE_CLUSTER_AGENT_SERVICE_PORT_HTTPS_INTERNAL=443 CATTLE_CLUSTER_REGISTRY= CATTLE_INGRESS_IP_DOMAIN=<http://sslip.io|sslip.io> CATTLE_INSTALL_UUID=47458027-d42e-4a65-99d9-026cc3e2bc07 CATTLE_INTERNAL_ADDRESS= CATTLE_IS_RKE=false CATTLE_K8S_MANAGED=true CATTLE_NODE_NAME=cattle-cluster-agent-6df659fdd9-r66nt CATTLE_SERVER=<https://final.rancher.com> CATTLE_SERVER_VERSION=v2.7.1
INFO: Using resolv.conf: search cattle-system.svc.cluster.local svc.cluster.local cluster.local eu-central-1.compute.internal nameserver 169.254.25.10 options ndots:5
INFO: <https://final.rancher.com/ping> is accessible
INFO: <http://final.rancher.com|final.rancher.com> resolves to 35.157.244.86
INFO: Value from <https://final.rancher.com/v3/settings/cacerts> is an x509 certificate
time="2023-03-07T12:54:00Z" level=info msg="Listening on /tmp/log.sock"
time="2023-03-07T12:54:00Z" level=info msg="Rancher agent version v2.7.1 is starting"
time="2023-03-07T12:54:00Z" level=info msg="Connecting to <wss://final.rancher.com/v3/connect/register> with token starting with 9hpw5dqzd6d28nb6dzs7v8q4stv"
time="2023-03-07T12:54:00Z" level=info msg="Connecting to proxy" url="<wss://final.rancher.com/v3/connect/register>"
from rancher host pod got:
│ 2023/03/07 12:54:29 [INFO] error in remotedialer server [400]: websocket: close 1006 (abnormal closure): unexpected EOF                                                                 │
a

agreeable-oil-87482

03/07/2023, 1:02 PM
Do you have a firewall/proxy between this cluster and Rancher?
h

helpful-summer-57996

03/07/2023, 1:02 PM
opened all. though the DNS of rancher host is through ingress controller
a

agreeable-oil-87482

03/07/2023, 1:03 PM
On one of the nodes from the cluster you're trying to import can you curl the rancher url?
h

helpful-summer-57996

03/07/2023, 1:03 PM
Yes
a

agreeable-oil-87482

03/07/2023, 1:04 PM
Could be that something is dropping websocket connections
Is the above the extent of the cluser agent logs?
h

helpful-summer-57996

03/07/2023, 1:06 PM
yes, thats all the logs from the imported cluster agent, stuck on connecting
a

agreeable-oil-87482

03/07/2023, 1:06 PM
What version of k8s is running on the downstream cluster?
h

helpful-summer-57996

03/07/2023, 1:07 PM
V1.23.6, using kubespray
OK, Good news: it worked, but the issue was still un-clear
39 Views