hoeghh / kubernetes_the_easy_way

Automating Kubernetes the hard way with Vagrant and scripts
MIT License
20 stars 11 forks source link

Use a private network range for Pod CIDR #29

Closed hoeghh closed 6 years ago

hoeghh commented 6 years ago

The network range 20.0.0.0/16 is in the public network area (this is owned by Microsoft)

https://en.wikipedia.org/wiki/Private_network

In time, this should be configurable in the config file

hoeghh commented 6 years ago

Maybe use the range 172.16.0.0/12 . Test, and if it works, replace the current address space.

hoeghh commented 6 years ago

Files to be changed :

grep -r "20.*/16" scripts/*
scripts/install-loadbalancer.sh:/usr/bin/weave launch --ipalloc-init observer $WORKER_IPS --ipalloc-range 20.0.0.0/16
scripts/install-master.sh:  --service-cluster-ip-range=20.32.0.0/16 \\
scripts/install-master.sh:  --cluster-cidr=20.0.0.0/16 \\
scripts/install-master.sh:  --service-cluster-ip-range=20.32.0.0/16 \\
scripts/install-master.sh:  /usr/local/bin/kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(/usr/local/bin/kubectl version | base64 | tr -d '\n')&env.IPALLOC_RANGE=20.0.0.0/16"
scripts/install-worker.sh:# From master :  --cluster-cidr=10.200.0.0/16 
scripts/install-worker.sh:  --cluster-cidr=20.0.0.0/16 \\
hoeghh commented 6 years ago

Working on this. Needs testing before merge.

hoeghh commented 6 years ago

Fixed with 14af8ef80670805945429f6b34705137306ba3e7