diff --git a/scripts/cluster/kube-system.yaml b/scripts/cluster/kube-system.yaml deleted file mode 100644 index 986f4b482..000000000 --- a/scripts/cluster/kube-system.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: kube-system diff --git a/scripts/local-cluster.sh b/scripts/local-cluster.sh index 1cbcd78b9..bb0ce736d 100755 --- a/scripts/local-cluster.sh +++ b/scripts/local-cluster.sh @@ -169,7 +169,7 @@ start_kubernetes() { --volume=/:/rootfs:ro \ --volume=/sys:/sys:ro \ --volume=/var/lib/docker/:/var/lib/docker:rw \ - --volume=/var/lib/kubelet/:/var/lib/kubelet:rw \ + --volume=/var/lib/kubelet/:/var/lib/kubelet:rw,rslave \ --volume=/var/run:/var/run:rw \ --net=host \ --pid=host \ @@ -189,8 +189,10 @@ start_kubernetes() { sleep 1 done - # Create kube-system namespace in kubernetes - $KUBECTL create namespace kube-system >/dev/null + if [[ $KUBE_VERSION == "1.2"* ]]; then + create_kube_system_namespace + create_kube_dns + fi # We expect to have at least 3 running pods - etcd, master and kube-proxy. local attempt=1 @@ -218,6 +220,11 @@ setup_firewall() { fi } +# Create kube-system namespace in kubernetes +create_kube_system_namespace() { + $KUBECTL create namespace kube-system >/dev/null +} + # Activate skydns in kubernetes and wait for pods to be ready. create_kube_dns() { [[ "${ENABLE_CLUSTER_DNS}" = true ]] || return @@ -321,7 +328,6 @@ kube_up() { generate_kubeconfig start_kubernetes - create_kube_dns $KUBECTL cluster-info }