Closed leodotcloud closed 8 years ago
I followed the exact steps mentioned in the docs to start weave.
You are missing a weave expose
.
Did you look at our docs for CNI and k8s? If you didn't find them, I'd love to hear suggestions for how to make them more discoverable.
@rade 👍 . Thanks that helped.
I did go through that document.
weave expose
: I assumed it was something to do with exposing ports on the host, similar to -P/-p flag of docker, so didn't bother(also missed/forgot) to run. Also from watching the videos and reading the other documents this command was not very obvious.
It would be great if it's explained why this command is needed for kubernetes. Also adding this error in the troubleshooting page would be useful for others.
The 'expose' is needed to give the weave bridge an IP. Which in turn is required by k8s for obscure reasons that @bboreham or @errordeveloper might remember.
@rade: Is there any specific reason the bridge is not assigned the IP by default, irrespective of whether it's k8s or something else? If this is part of the weave launch, that really simplifies and reduces one additional step during configuration.
Is there any specific reason the bridge is not assigned the IP by default, irrespective of whether it's k8s or something else?
Yes. Assigning it an IP requires allocating an IP, which in turn requires consensus between weave peers, which in turn requires a majority to be reachable. So this places a bunch of constraints on how nodes get deployed / started.
We expose
the network so Weave containers have a route out of the Weave network to contact other services, and Kubernetes healthchecks have a route into the Weave network.
@rade is correct that waiting for consensus is sufficiently problematic that I didn't want to do it by default.
Probably we should have another issue to find a better way to allocate a gateway, e.g. using the same address on all nodes. Needs analysis.
Setup details: Three vagrant machines. 1) kubernetes master --> running etcd, apiserver, scheduler, controller-manager 2) kubernetes host h1 --> weave launch 3) kubernetes host h2 --> weave launch
OS/Environment:
Command run:
./kubectl create -f simple_nginx_pod.yml
Expected result: The pods get created successfully.
Error:
I followed the exact steps mentioned in the docs to start weave.
Launched the kubelet specifying the CNI information.