Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with calico-node on Kubernetes+Vagrant #418

Closed
frankgreco opened this issue Dec 22, 2016 · 3 comments
Closed

Problem with calico-node on Kubernetes+Vagrant #418

frankgreco opened this issue Dec 22, 2016 · 3 comments

Comments

@frankgreco
Copy link
Contributor

I am attempting to create a Kubernetes cluster using Calico v2.0 inside of Vagrant via Ansible. I am using machine.vm.network :private_network, type: "dhcp" to setup Vagrant networking. Because of this, the primary network ip is always 10.0.2.15. Hence, I use kubeadm init --api-server-addresses=< secondary network ip > so that my nodes can successfully join using kubeadm join.

However, I run into problems when I apply the Calico configuration. The calico-node DaemonSet provisions a pod on each node however because the primary network ip is 10.0.2.15 on all of the nodes, all of the DaemonSet pods have an ip of 10.0.2.15. I believe it gets this ip by auto detecting it.

Is there a way to specify what is to be used for these DaemonSet pods so that I can get around this issue? Or, is there a better way to get around this issue?

@gunjan5
Copy link
Contributor

gunjan5 commented Dec 22, 2016

@frankgreco you can specify which IP to use when you start calico/node with --ip if you were starting the node manually with calicoctl node run, but in your case you're using DaemonSets, so you'd have to set the IP ENV var for the calico-node pod. If it's not set or set to "" it autodetects the IP.
If you're using the DaemonSet from the selfhosted manifest from Calico docs, that would be these lines:

# Auto-detect the BGP IP address.
            - name: IP
              value: ""

@frankgreco
Copy link
Contributor Author

@gunjan5 how would I specify this dynamically though so I can get the ip for each node that the DaemonSet pod is brought up on?

@caseydavenport
Copy link
Member

@frankgreco There's actually an open issue tracking this :)

We're looking to improve the way we do IP auto detection by provide multiple detection "strategies". See here: https://github.com/projectcalico/calicoctl/issues/873.

Once projectcalico/calicoctl#1411 is complete we'll be good to go on implementing one of the additional strategies mentioned in that issue.

Until then, I think you would have to edit the Calico Node API resources to have the correct IP address using calicoctl. e.g

calicoctl get node <name> -o yaml
...
calicoctl apply -f updated_node.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants