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

Expose pod-network-cidr on kubeadm #3865

Closed
ozdanborne opened this issue Mar 13, 2019 · 3 comments · Fixed by #3892
Closed

Expose pod-network-cidr on kubeadm #3865

ozdanborne opened this issue Mar 13, 2019 · 3 comments · Fixed by #3892
Labels
area/networking networking issues good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@ozdanborne
Copy link

Getting Calico working in Kubernetes / Minikube can be tricky because you need to set the pod network cidr on multiple components (apiserver, controller-manager, and proxy) individually.

Kubeadm has made this easier by tying all three of those flags to a single "high-level" flag - --pod-network-cidr.

Now that minikube is using kubeadm under the hood, could we expose the --pod-network-cidr flag on it?

After a brief look at the code, I think we'd just need to template this value:

@tstromberg tstromberg added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. area/networking networking issues labels Mar 13, 2019
@tstromberg
Copy link
Contributor

This sounds like a great idea, and I would be happy to approve any PR's that make it so. Help wanted!

@tstromberg tstromberg added kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Mar 13, 2019
@11janci
Copy link
Contributor

11janci commented Mar 16, 2019

I would like to take this if no objections

@hswong3i
Copy link

With my latest founding we could run minikube + flannel without kubeadm --pod-network-cidr, see

From https://github.com/coreos/flannel/blob/master/Documentation/troubleshooting.md#kubernetes-specific what we really needed are kubelet's --pod-cidr=<cidr> and controller-manager's --allocate-node-cidrs=true --cluster-cidr=<cidr>, so something like this:

minikube start \
    --extra-config=controller-manager.allocate-node-cidrs=true \
    --extra-config=controller-manager.cluster-cidr=10.233.64.0/18 \
    --extra-config=kubeadm.ignore-preflight-errors=FileContent--proc-sys-net-bridge-bridge-nf-call-iptables,SystemVerification \
    --extra-config=kubelet.cgroup-driver=systemd \
    --extra-config=kubelet.network-plugin=cni \
    --extra-config=kubelet.pod-cidr=10.233.64.0/18 \
    --extra-config=kubelet.resolv-conf=/run/systemd/resolve/resolv.conf \
    --kubernetes-version=v1.14.1 \
    --network-plugin=cni \
    --vm-driver=none

curl -skL https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml > /tmp/kube-flannel.yml
sed -i 's/10.244.0.0\/16/10.233.64.0\/18/g' /tmp/kube-flannel.yml
kubectl apply -f /tmp/kube-flannel.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking networking issues good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants