Skip to content

Commit

Permalink
AWS kube-up: Allow spot instances
Browse files Browse the repository at this point in the history
I think we should probably leave this undocumented for now, until we
have a better way to launch multiple sets of nodes, but it's great for
cost savings while testing!

Fix kubernetes#21200
  • Loading branch information
justinsb committed Feb 22, 2016
1 parent d089fa8 commit fb12c48
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cluster/aws/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,12 @@ function start-minions() {
else
public_ip_option="--no-associate-public-ip-address"
fi
local spot_price_option
if [[ -n "${NODE_SPOT_PRICE:-}" ]]; then
spot_price_option="--spot-price ${NODE_SPOT_PRICE}"
else
spot_price_option=""
fi
${AWS_ASG_CMD} create-launch-configuration \
--launch-configuration-name ${ASG_NAME} \
--image-id $KUBE_NODE_IMAGE \
Expand All @@ -1129,6 +1135,7 @@ function start-minions() {
--key-name ${AWS_SSH_KEY_NAME} \
--security-groups ${NODE_SG_ID} \
${public_ip_option} \
${spot_price_option} \
--block-device-mappings "${NODE_BLOCK_DEVICE_MAPPINGS}" \
--user-data "fileb://${KUBE_TEMP}/node-user-data.gz"

Expand Down

0 comments on commit fb12c48

Please sign in to comment.