Skip to content

Instantly share code, notes, and snippets.

@ValentinFunk
Last active April 15, 2016 17:13
Show Gist options
  • Save ValentinFunk/dd1737a21dec31679839dcf5f27bd20b to your computer and use it in GitHub Desktop.
Save ValentinFunk/dd1737a21dec31679839dcf5f27bd20b to your computer and use it in GitHub Desktop.
Some instructions for adding a new node to the cluster using the ubuntu scripts
export nodes="root@<MASTER NODE> root@<NEW NODE>"
export role="ai i"
export NUM_NODES=${NUM_NODES:-2}
export SERVICE_CLUSTER_IP_RANGE=192.168.3.0/24
export FLANNEL_NET=172.16.0.0/16
./new-node.sh
<IN kubernetes/cluster/new-node.sh>
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
if [ -f "${KUBE_ROOT}/cluster/env.sh" ]; then
source "${KUBE_ROOT}/cluster/env.sh"
fi
source "${KUBE_ROOT}/cluster/kube-util.sh"
if [ -z "${ZONE-}" ]; then
echo "... Starting cluster using provider: ${KUBERNETES_PROVIDER}" >&2
else
echo "... Starting cluster in ${ZONE} using provider ${KUBERNETES_PROVIDER}" >&2
fi
echo "... calling verify-prereqs" >&2
verify-prereqs
if [[ "${KUBE_STAGE_IMAGES:-}" == "true" ]]; then
echo "... staging images" >&2
stage-images
fi
echo "... calling kube-up" >&2
export KUBE_CONFIG_FILE=${KUBE_CONFIG_FILE:-${KUBE_ROOT}/cluster/ubuntu/config-default.sh}
source "${KUBE_CONFIG_FILE}"
setClusterInfo
provision-node <CHILD_NODE>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment