Re: How to define pod_cidr when not using an overlay

38 views
Skip to first unread message

Brandon Philips

unread,
Aug 17, 2016, 7:10:37 PM8/17/16
to Tim Korn, CoreOS User
Hello Tim-

I haven't done this myself. What I think you need to do is add the flag `--allocate-node-cidrs=false` to the controller manager and on each node add the flag `--pod-cidr` to the kubelet flags.

Interested in how this goes! We should fix up the guides here: http://kubernetes.io/docs/admin/networking/#l2-networks-and-linux-bridging

Thank You,

Brandon

On Tue, Aug 16, 2016 at 9:53 PM Tim Korn <kornf...@gmail.com> wrote:
I'm trying to setup K8S on bare-metal without an overlay network.  Heres what I've got.

master01 : node IP 10.10.10.10/24 : no pods
node01 : node IP 10.10.10.11/24 : pod_cidr 10.10.10.32/27
node02 : node IP 10.10.10.12/24 : pod_cidr 10.10.10.64/27
node03 : node IP 10.10.20.11/24 : pod_cidr 10.10.20.32/27

I can't figure out where I define a pod_cidr for each node if they're all going to be different...  I tried just moving on without doing any additional network tasks...

Currently I just have K8S installed according to https://coreos.com/kubernetes/docs/latest/deploy-workers.html, but I skipped anything involving calico and flannel.  So node01's networking looks like this: 
node02 kubernetes # ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp6s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:25:90:7d:b9:7a brd ff:ff:ff:ff:ff:ff
    inet 10.96.86.13/24 brd 10.96.86.255 scope global dynamic enp6s0f0
       valid_lft 36726sec preferred_lft 36726sec
    inet6 fe80::225:90ff:fe7d:b97a/64 scope link
       valid_lft forever preferred_lft forever
3: enp6s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:25:90:7d:b9:7b brd ff:ff:ff:ff:ff:ff
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:a4:05:bd:3b brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:a4ff:fe05:bd3b/64 scope link
       valid_lft forever preferred_lft forever

I assume this is because flannel didn't create another bridge, and nothing has told the nodes what their cird range should be.  All three of them have docker0 using 172.17.0.1/16.

If i run kubectl run my-nginx --image=nginx --port=80 it tries to deploy the pod, but it never starts:
tkorn:kuber tkorn$ kubectl get deployments
NAME       DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
my-nginx   1         1         1            0           4h
tkorn:kuber tkorn$ kubectl get pods
NAME                        READY     STATUS    RESTARTS   AGE
my-nginx-2494149703-jxx0p   0/1       Pending   0          4h

A docker ps on the nodes just shows the following...none of them have this nginx pod:
node02 kubernetes # docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS              PORTS               NAMES
b5fe545e8d3d        quay.io/coreos/hyperkube:v1.3.4_coreos.0   "/hyperkube proxy --m"   About an hour ago   Up About an hour                        k8s_kube-proxy.d62dcbdf_kube-proxy-10.96.86.13_kube-system_992d7858cb3726dc6ed8cb88b35e4244_193ef02f
5254544e1ad1        gcr.io/google_containers/pause-amd64:3.0   "/pause"                 About an hour ago   Up About an hour                        k8s_POD.d8dbe16c_kube-proxy-10.96.86.13_kube-system_992d7858cb3726dc6ed8cb88b35e4244_8c31b254


I think I have a disconnect between kubernetes and docker on the nodes, and I can't figure out what to do about that.  Any ideas?



--
You received this message because you are subscribed to the Google Groups "CoreOS User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coreos-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages