From 2255e6f757cb661260fc2b474624a21e372e3ff0 Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Thu, 12 Mar 2015 15:10:08 -0700 Subject: [PATCH] Fix ubuntu-cluster to use apiserver not etcd. --- cluster/ubuntu-cluster/configure.sh | 4 ++++ cluster/ubuntu-cluster/default_scripts/kube-proxy | 2 +- cluster/ubuntu-cluster/default_scripts/kubelet | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cluster/ubuntu-cluster/configure.sh b/cluster/ubuntu-cluster/configure.sh index 0667728e14e51..75180f0ea1826 100755 --- a/cluster/ubuntu-cluster/configure.sh +++ b/cluster/ubuntu-cluster/configure.sh @@ -130,6 +130,8 @@ do item="$name=http://$i:2380" if [ "$ii" == 1 ]; then cluster=$item + #record the masterIP for later use. + masterIP=$i else cluster="$cluster,$item" if [ "$ii" -gt 2 ]; then @@ -162,6 +164,8 @@ while true; do configEtcd $etcdName $myIP $cluster # For minion set MINION IP in default_scripts/kubelet sed -i "s/MY_IP/${myIP}/g" default_scripts/kubelet + sed -i "s/MASTER_IP/${masterIP}/g" default_scripts/kubelet + sed -i "s/MASTER_IP/${masterIP}/g" default_scripts/kube-proxy # For master set MINION IPs in kube-controller-manager minionIPs="$minionIPs,$myIP" diff --git a/cluster/ubuntu-cluster/default_scripts/kube-proxy b/cluster/ubuntu-cluster/default_scripts/kube-proxy index 147ca8f8eb93b..112246457dc56 100644 --- a/cluster/ubuntu-cluster/default_scripts/kube-proxy +++ b/cluster/ubuntu-cluster/default_scripts/kube-proxy @@ -4,7 +4,7 @@ # KUBE_PROXY="/opt/bin/kube-proxy" # Use KUBE_PROXY_OPTS to modify the start/restart options -KUBE_PROXY_OPTS="--master=http://127.0.0.1:8080 \ +KUBE_PROXY_OPTS="--master=http://MASTER_IP:8080 \ --logtostderr=true" # Add more envionrment settings used by kube-apiserver here diff --git a/cluster/ubuntu-cluster/default_scripts/kubelet b/cluster/ubuntu-cluster/default_scripts/kubelet index 969ce4f42c630..0ee4463646e28 100644 --- a/cluster/ubuntu-cluster/default_scripts/kubelet +++ b/cluster/ubuntu-cluster/default_scripts/kubelet @@ -8,7 +8,7 @@ KUBELET_OPTS="--address=0.0.0.0 \ --port=10250 \ --hostname_override=MY_IP \ ---api_servers=http://127.0.0.1:8080 \ +--api_servers=http://MASTER_IP:8080 \ --logtostderr=true" # Add more envionrment settings used by kube-scheduler here