From 99c79d1ccf91b18b4f50c81e707805bdc7c98e80 Mon Sep 17 00:00:00 2001 From: huggsboson Date: Sat, 19 Mar 2016 21:07:38 -0700 Subject: [PATCH] Fixes #23153. Sadly, kube-system isn't automatically created, so people need to make sure to create it in their turnup scripts. Also after creating kube-system it can take 10+ seconds for master and proxy to show up. I tested the equivalent of these changes locally, but not these changes themselves as I don't have a dev/build env up, so please read carefully and maybe try them out! Use kubectl create ns --- cluster/images/hyperkube/etcd.json | 5 ++++- cluster/images/hyperkube/kube-proxy.json | 5 ++++- cluster/images/hyperkube/master-multi.json | 5 ++++- cluster/images/hyperkube/master.json | 5 ++++- cluster/images/hyperkube/turnup.sh | 8 +++++++- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/cluster/images/hyperkube/etcd.json b/cluster/images/hyperkube/etcd.json index 1f4a39280e8f3..f4268d9b1ba33 100644 --- a/cluster/images/hyperkube/etcd.json +++ b/cluster/images/hyperkube/etcd.json @@ -1,7 +1,10 @@ { "apiVersion": "v1", "kind": "Pod", - "metadata": {"name":"k8s-etcd"}, + "metadata": { + "name": "k8s-etcd", + "namespace": "kube-system" + }, "spec": { "hostNetwork": true, "containers": [ diff --git a/cluster/images/hyperkube/kube-proxy.json b/cluster/images/hyperkube/kube-proxy.json index 7a1ed0de1962f..b005433b86dbf 100644 --- a/cluster/images/hyperkube/kube-proxy.json +++ b/cluster/images/hyperkube/kube-proxy.json @@ -1,7 +1,10 @@ { "apiVersion": "v1", "kind": "Pod", - "metadata": {"name":"k8s-proxy"}, + "metadata": { + "name": "k8s-proxy", + "namespace": "kube-system" + }, "spec": { "hostNetwork": true, "containers": [ diff --git a/cluster/images/hyperkube/master-multi.json b/cluster/images/hyperkube/master-multi.json index 7fd4718c42804..3e201fdd4863c 100644 --- a/cluster/images/hyperkube/master-multi.json +++ b/cluster/images/hyperkube/master-multi.json @@ -1,7 +1,10 @@ { "apiVersion": "v1", "kind": "Pod", -"metadata": {"name":"k8s-master"}, +"metadata": { + "name": "k8s-master", + "namespace": "kube-system" +}, "spec":{ "hostNetwork": true, "containers":[ diff --git a/cluster/images/hyperkube/master.json b/cluster/images/hyperkube/master.json index 6dc5826dc5b2c..ca8cd8f4d2492 100644 --- a/cluster/images/hyperkube/master.json +++ b/cluster/images/hyperkube/master.json @@ -1,7 +1,10 @@ { "apiVersion": "v1", "kind": "Pod", -"metadata": {"name":"k8s-master"}, +"metadata": { + "name": "k8s-master", + "namespace": "kube-system" +}, "spec":{ "hostNetwork": true, "containers":[ diff --git a/cluster/images/hyperkube/turnup.sh b/cluster/images/hyperkube/turnup.sh index 856d7e1fb1395..b19f9e9a9545b 100755 --- a/cluster/images/hyperkube/turnup.sh +++ b/cluster/images/hyperkube/turnup.sh @@ -20,7 +20,7 @@ set -o errexit set -o nounset set -o pipefail -K8S_VERSION=${K8S_VERSION:-"1.2.0-alpha.7"} +K8S_VERSION=${K8S_VERSION:-"1.2.0"} docker run \ --volume=/:/rootfs:ro \ @@ -41,3 +41,9 @@ docker run \ --cluster-dns=10.0.0.10 \ --cluster-domain=cluster.local \ --allow-privileged=true --v=2 + +until $(kubectl cluster-info &> /dev/null); do + sleep 1 +done + +kubectl create ns kube-system