Update scripts to add PodCIDR firewall rule for dns

pull/118/head
Ivan Font 2017-01-20 09:22:27 -08:00
parent e8f056a2ba
commit a7da79ad54
8 changed files with 23 additions and 12 deletions

View File

@ -2,7 +2,7 @@
set -x set -x
if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then
echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION environment variables" echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION (e.g. 'vX.Y.Z') environment variables"
exit 1 exit 1
fi fi

View File

@ -1,8 +1,8 @@
#!/usr/bin/bash #!/usr/bin/bash
set -x set -x
if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} ]]; then if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then
echo "Must set NUM_CONTROLLERS and NUM_WORKERS environment variables" echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION (e.g. 'vX.Y.Z') environment variables"
exit 1 exit 1
fi fi

View File

@ -4,7 +4,7 @@ set -x
DOCKER_VERSION=1.12.5 DOCKER_VERSION=1.12.5
if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then
echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION environment variables" echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION (e.g. 'vX.Y.Z') environment variables"
exit 1 exit 1
fi fi

View File

@ -32,8 +32,8 @@ gcloud -q compute firewall-rules delete \
kubernetes-allow-healthz \ kubernetes-allow-healthz \
kubernetes-allow-icmp \ kubernetes-allow-icmp \
kubernetes-allow-internal \ kubernetes-allow-internal \
kubernetes-allow-internal-podcidr \
kubernetes-allow-rdp \ kubernetes-allow-rdp \
kubernetes-nginx-service \
kubernetes-allow-ssh \ kubernetes-allow-ssh \
kubernetes-nginx-service kubernetes-nginx-service

View File

@ -1,8 +1,8 @@
#!/usr/bin/bash #!/usr/bin/bash
set -x set -x
if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} ]]; then if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then
echo "Must set NUM_CONTROLLERS and NUM_WORKERS environment variables" echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION (e.g. 'vX.Y.Z') environment variables"
exit 1 exit 1
fi fi

View File

@ -2,7 +2,12 @@
set -x set -x
if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then
echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION environment variables" echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION (e.g. 'vX.Y.Z') environment variables"
exit 1
fi
if [[ ! ${KUBERNETES_VERSION} =~ ^v[0-9].[0-9].[0-9]$ ]]; then
echo "KUBERNETES_VERSION must be in form 'vX.Y.Z'"
exit 1 exit 1
fi fi

View File

@ -1,8 +1,8 @@
#!/usr/bin/bash #!/usr/bin/bash
set -x set -x
if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} ]]; then if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then
echo "Must set NUM_CONTROLLERS and NUM_WORKERS environment variables" echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION (e.g. 'vX.Y.Z') environment variables"
exit 1 exit 1
fi fi
@ -114,4 +114,5 @@ done
for host in ${kube_hosts}; do for host in ${kube_hosts}; do
gcloud compute copy-files ca.pem kubernetes-key.pem kubernetes.pem ${host}:~/ gcloud compute copy-files ca.pem kubernetes-key.pem kubernetes.pem ${host}:~/
sleep 2
done done

View File

@ -1,8 +1,8 @@
#!/usr/bin/bash #!/usr/bin/bash
set -x set -x
if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} ]]; then if [[ -z ${NUM_CONTROLLERS} || -z ${NUM_WORKERS} || -z ${KUBERNETES_VERSION} ]]; then
echo "Must set NUM_CONTROLLERS and NUM_WORKERS env vars" echo "Must set NUM_CONTROLLERS, NUM_WORKERS and KUBERNETES_VERSION (e.g. 'vX.Y.Z') environment variables"
exit 1 exit 1
fi fi
@ -25,6 +25,11 @@ gcloud compute firewall-rules create kubernetes-allow-internal \
--network kubernetes \ --network kubernetes \
--source-ranges 10.240.0.0/24 --source-ranges 10.240.0.0/24
gcloud compute firewall-rules create kubernetes-allow-internal-podcidr \
--allow tcp:0-65535,udp:0-65535,icmp \
--network kubernetes \
--source-ranges 10.200.0.0/16
gcloud compute firewall-rules create kubernetes-allow-rdp \ gcloud compute firewall-rules create kubernetes-allow-rdp \
--allow tcp:3389 \ --allow tcp:3389 \
--network kubernetes \ --network kubernetes \