*202. Practice Test - Deploy Network Solution* after run `kubectl apply -f "<htt . . .

Sameer Jain:
202. Practice Test - Deploy Network Solution after run kubectl apply -f "<https://cloud.weave.works/k8s/net?k8s-version=$(kubectl> version | base64 | tr -d '\n')" weave-net pods goes into CrashLoopBackOff

kubectl get pods --all-namespaces 
NAMESPACE     NAME                                   READY   STATUS              RESTARTS   AGE
default       app                                    0/1     ContainerCreating   0          5m57s
kube-system   coredns-74ff55c5b-8hc98                1/1     Running             0          28m
kube-system   coredns-74ff55c5b-qspks                1/1     Running             0          28m
kube-system   etcd-controlplane                      1/1     Running             0          29m
kube-system   kube-apiserver-controlplane            1/1     Running             0          29m
kube-system   kube-controller-manager-controlplane   1/1     Running             0          29m
kube-system   kube-proxy-xfr86                       1/1     Running             0          29m
kube-system   kube-scheduler-controlplane            1/1     Running             0          29m
kube-system   weave-net-7wjjb                        1/2     CrashLoopBackOff    5          5m5s

here is event from weave-net-7wjjb pod

Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  6m52s                  default-scheduler  Successfully assigned kube-system/weave-net-7wjjb to controlplane
  Normal   Pulled     6m50s                  kubelet            Container image "<http://docker.io/weaveworks/weave-kube:2.8.1|docker.io/weaveworks/weave-kube:2.8.1>" already present on machine
  Normal   Created    6m49s                  kubelet            Created container weave-init
  Normal   Started    6m49s                  kubelet            Started container weave-init
  Normal   Pulled     6m45s                  kubelet            Container image "<http://docker.io/weaveworks/weave-npc:2.8.1|docker.io/weaveworks/weave-npc:2.8.1>" already present on machine
  Normal   Created    6m44s                  kubelet            Created container weave-npc
  Normal   Started    6m44s                  kubelet            Started container weave-npc
  Normal   Pulled     5m53s (x4 over 6m46s)  kubelet            Container image "<http://docker.io/weaveworks/weave-kube:2.8.1|docker.io/weaveworks/weave-kube:2.8.1>" already present on machine
  Normal   Created    5m52s (x4 over 6m46s)  kubelet            Created container weave
  Normal   Started    5m51s (x4 over 6m45s)  kubelet            Started container weave
  Warning  BackOff    108s (x25 over 6m39s)  kubelet            Back-off restarting failed container

R Banerjee:
Describe pod may show whats wrong ?

Sameer Jain:
@R Banerjee see original post I have added events from the pod.

Sameer Jain:
hear is log from container

[email protected]:~# kubectl logs -n kube-system weave-net-7wjjb weave
Network 10.32.0.0/12 overlaps with existing route 10.40.85.0/24 on host

R Banerjee:
oh… i may have missed that… let me seecheck out 202 test once

Sameer Jain:
from log error is because of overlaps of route.

R Banerjee:
Yes, but that should not fail the container , should it?

Sameer Jain:
I do not know, I am not an expert here.

unnivkn:
@Sameer Jain please try this:

unnivkn:
k -n kube-system delete po weave-net-7wjjb --force
kubectl apply -f “https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d ‘\n’)&env.IPALLOC_RANGE=10.32.0.0/16”

R Banerjee:
wont /16 also overlap with the existing route? Just curious

Sameer Jain:
@unnivkn it worked.

Sameer Jain:
@R Banerjee for 10.32.0.0/16 usable range is 10.32.0.1 - 10.32.255.254

R Banerjee:
aah , right… the 10.40 is not in that range…

R Banerjee:
sorry