kinvolk/kube-spawn

Start a cluster using vagrant on Arch linux

MuriloSchaefer opened this issue · 9 comments

Hi,

I want to start a cluster on a vagrant machine. I followed the instructions in the docs, but when I exec the vagrant-all.sh script, I get the error:

fedora: + sudo GOPATH=/home/vagrant/go CNI_PATH=/home/vagrant/go/bin ./kube-spawn create --nodes=2
fedora: Error: unknown flag: --nodes

I open the machine with vagrant ssh fedora and the kube-spawn doesn't have a --nodes flag.
What could be happening?

Cheers!

Ouch. That's definitely a bug in scripts/vagrant-setup-env.sh. The script is quite outdated.
I'm going to fix it. Thanks for the report.

What do I need to change to fix this?
I need to fix this quickly, due tomorrow, so if you tell me what to change I can change it and do a PR.

thanks,

Today I already created a PR #290 to fix the issue.
Does that PR work for you?

I'll try it today and let you know about it. Thank you.

So,

I tested this version, the script created the cluster, but now I got the error:

    fedora: + sudo GOPATH=/home/vagrant/go ./kube-spawn start --cni-plugin-dir=/home/vagrant/go/bin --nodes=2
    fedora: making iptables FORWARD chain defaults to ACCEPT...
    fedora: Starting 2 nodes in cluster default ...
    fedora: Waiting for machine kube-spawn-default-worker-42sfmr to start up ...
    fedora: Waiting for machine kube-spawn-default-master-c80yyr to start up ...
    fedora: exit status 1
    fedora: Failed to start machine kube-spawn-default-worker-42sfmr: error running cnispawn: failed to set bridge addr: could not add IP address to "cni0": file exists

I believe that this is not a problem with the script but a error in the configuration of the machine, is that right?

Yeah, right. That's not an issue with the script. At least the script must have worked fine.
I think that network interface problem would be gone if you clean up the existing interface cni0, right?
Anyway I'm going to merge #290.
If you still have problems when using kube-spawn, feel free to create another issue.

Hi,
I don't know if it should be posted in other issue (let me know if it should be, I'll change)
when trying to create a cluster, the script could not create the master:

fedora: Starting 3 nodes in cluster default ...
    fedora: Waiting for machine kube-spawn-default-worker-jbiqwy to start up ...
    fedora: Waiting for machine kube-spawn-default-master-629im8 to start up ...
    fedora: Waiting for machine kube-spawn-default-worker-i73lcz to start up ...
    fedora: Started kube-spawn-default-worker-jbiqwy
    fedora: Bootstrapping kube-spawn-default-worker-jbiqwy ...
    fedora: Started kube-spawn-default-worker-i73lcz
    fedora: Bootstrapping kube-spawn-default-worker-i73lcz ...
    fedora: Cluster "default" started
    fedora: Failed to start machine kube-spawn-default-master-629im8: timeout waiting for "kube-spawn-default-master-629im8" to start
    fedora: Failed to start cluster: no master machines found

the same occurs with 2 nodes, but with 1 node everything works fine.
Cheers,

@MuriloSchaefer
There can be many reasons for that. So I cannot tell exactly what the issue is. Maybe you would need to get some logs from kubelet or else.
Anyway can you please create another issue? Comments in a closed issue can be easily forgotten.

Okay, I'll do it today, try to find what is happening.

Thanks for your help