Cannot active first cluster in Rancher 2.0


Disclaimer: I am extremely new to kubernetes, containers, docker, etc. just consider me an uber-noob.

I’m looking at Rancher since it seems pretty beginner friendly and super easy to manage and so I’m trying to setup my first cluster to get an idea of what all I can do with it, but I keep running into the same problem and No matter how much I search for solutions, I haven’t seen anyone with the same issue, always a different issue.

So here’s what I did. I have a fresh VM setup with Linux Ubuntu 16.04.

I installed Docker version 17.03.2 following their documentation strictly as shown here

Then I went through the quickstart documentation for Rancher 2.0 to create a custom cluster.

So in order:
I installed rancher using sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/server:preview

I logged into rancher using a web browser and admin/admin
I reset the password when prompted
I kept the URL the same IP address as not to mess with it.
I clicked Add Cluster
I clicked Custom Cluster and gave it a simple name.
I left all options at defaults
On Node Roles I made sure all 3 boxes were checked.
I copied the command that was auto generated to my clipboard.
I ran that command on my linux host and ran it.
When it was finished I clicked Done back on the web browser.

At this time, the cluster went into a provisioning state and ran through several processes but eventually it stops and gives me this message.

Failed to get kubernetes node [OPO-VM-DOCK01]: “OPO-VM-DOCK01” not found

OPO-VM-DOCK01 is the name of my VM btw.

If I let it sit there in the provisioning state, it will periodically attempt to activate again but always gets stuck at the same spot.

I’m completely lost on what could be causing this and not sure what to do. Anyone else run into something like this? Everything else I found when people got to this point always had a different error like “failed to register node” or something instead.

Any help will be appreciated. Thanks.

What are the logs for the rancher agent on OPO-VM-DOCK01 ?

you run docker ps in ssh to get the ID, copy the ID and do docker logs ID to get the logs

Kubernetes wants everything to be named a valid DNS label (a-z, 0-9, and hyphen with a few other restrictions within that) and doesn’t accept uppercase. We usually lowercase things for you but this appears to be a place that is missed.

Changing to lowercase, it provisioned and activated just fine… lol sometimes the simplest things you know?

Welp, if it is intended for Rancher to auto-lowercase this for the user, I’m glad I was able to find an area where it didn’t. Thanks for the help.

I had the same issue when I used mixcase for my hostnames. You may want to put something in the documentation about this for now.