kubectl cluster-info Fails on kubernetes recipe
-
I installed a kubernetes cluster with the XOA recipe. 1 master and 4 nodes, put them on an active network adapter, and ran the recipe.
When I ssh into the master and run
kubectl cluster-info
I get:The connection to the server 192.168.200.146:6443 was refused - did you specify the right host or port?
Running
kubectl version
:Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:14:22Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"} The connection to the server 192.168.200.146:6443 was refused - did you specify the right host or port?
I am very new to kubernetes, so I might be missing something ovi, but it seems like the servers are not starting up on these machines. I was hoping to use this recipe to build a simple cluster that I can like my gitlab instance into. To get a picture of what I was planning to do, the gitlab guide is here: https://docs.gitlab.com/ee/user/project/clusters/add_remove_clusters.html.
I'd appreciate any advice you have on how to get this working. Or alternatives to the XOA recipe for simple kubernetes setup
Thanks!
-
Are you sure your VMs can communicate each other?
-
Ping @BenjiReis who'll check if it's still working in our lab.
-
192.168.200.146 is the ipaddr of that master node that I had ssh'ed into.
All nodes are able to ping the master. And the mastercan ping itself at the 192.168.200.146
Thanks for your help!
-
Hi!
Just tried it and it went fine. Have you seen any errors in XO when creating the cluster?
Did you use the userdebian
to ssh?Does the issue happen on every VM of your cluster?
Does your network allow traffic on port 6443?
-
Hi thanks for the reply,
No new entries on my logs (xoa -> settings -> logs).
I was using the debian user to ssh in.
Looking over all the machines, I get these errors or simular on master, node 1, and node 2. The node errors are connect to
localhost:8080
rather than192.168.200.146:6443
interestingly, it looks like neither node 3 or 4 got an ip addr on my network. So I am guessing this is an issue that happened as I was deploying the recipe. I am going to try redeploying the recipe. And potentially switch to using a xcp-ng virtual network with dhcp to try to get this to work. I wanted to keep these on my 192.168.200.1/24 net to make it easier to ssh in.I made 2 debian cloud init machines from hub templates and tested network connection on port 6443 using netcat. That worked.
I ran
nmap -p- 192.168.200.146
(all ports) against the host machine and got:Starting Nmap 7.70 ( https://nmap.org ) at 2020-02-22 18:09 EST Nmap scan report for 192.168.200.146 Host is up (0.045s latency). Not shown: 65531 closed ports PORT STATE SERVICE 22/tcp open ssh 10250/tcp open unknown 10251/tcp open unknown 10252/tcp open apollo-relay Nmap done: 1 IP address (1 host up) scanned in 26.49 seconds
Indicating that the 6443 port was not open for tcp.
-
Rebuilding the recipe worked. But I am continuing to face networking issues with CNI. I will debug those on my own!
Thank you so much for the help and for the great product!
I'm sure you all are very busy, but maybe consider adding a guide along with this recipe. Something that would walk a new user through setup up to having Helm Tiller installed (a popular tool for installing and managing Kubernetes applications). As someone who is new to Kubernetes, (and I think new folks will be the most helped by this recipe), the recipe left me with more questions than answers.
-
One issue I did run into was the nodes created by the recipe would try to access the master using the hostname "master". I had to manually specify this on my local DNS.
How do you do networking for your test install? Should I set these onto a private XCP-ng managed network and use a bastion VM to SSH in, rather than having them flat on the same network as my workstation?
Thanks!
-
Hello,
The DNS names of the master (and nodes also with a pattern) should be configurable for the user indeed. We'll add it in a next version of the recipe.
Thanks for the feedback!