fix(scripts): update local-cluster.sh to work with v1.3

pull/929/head
Adam Reese 8 years ago
parent 9f2555b989
commit eba297714f

@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: kube-system

@ -169,7 +169,7 @@ start_kubernetes() {
--volume=/:/rootfs:ro \ --volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \ --volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:rw \ --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 \ --volume=/var/run:/var/run:rw \
--net=host \ --net=host \
--pid=host \ --pid=host \
@ -189,8 +189,10 @@ start_kubernetes() {
sleep 1 sleep 1
done done
# Create kube-system namespace in kubernetes if [[ $KUBE_VERSION == "1.2"* ]]; then
$KUBECTL create namespace kube-system >/dev/null create_kube_system_namespace
create_kube_dns
fi
# We expect to have at least 3 running pods - etcd, master and kube-proxy. # We expect to have at least 3 running pods - etcd, master and kube-proxy.
local attempt=1 local attempt=1
@ -218,6 +220,11 @@ setup_firewall() {
fi 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. # Activate skydns in kubernetes and wait for pods to be ready.
create_kube_dns() { create_kube_dns() {
[[ "${ENABLE_CLUSTER_DNS}" = true ]] || return [[ "${ENABLE_CLUSTER_DNS}" = true ]] || return
@ -321,7 +328,6 @@ kube_up() {
generate_kubeconfig generate_kubeconfig
start_kubernetes start_kubernetes
create_kube_dns
$KUBECTL cluster-info $KUBECTL cluster-info
} }

Loading…
Cancel
Save