mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Vagrant: Allow env override of IP addresses
MASTER_IP and MINION_IP_BASE are hard-coded in vagrant's config-default.sh, and the values correspond to virtualbox's default subnet. On hosts that have both virtualbox and another provider installed, attempting to deploy kubernetes with the non-virtualbox provider is likely to result in broken networking. This change allows the addresses to be overridden via the environment so that more appropriate values can be used.
This commit is contained in:
parent
ceaddc0c44
commit
40632d3bf6
@ -21,14 +21,14 @@ NUM_MINIONS=${NUM_MINIONS-"1"}
|
||||
export NUM_MINIONS
|
||||
|
||||
# The IP of the master
|
||||
export MASTER_IP="10.245.1.2"
|
||||
export KUBE_MASTER_IP="10.245.1.2"
|
||||
export MASTER_IP=${MASTER_IP-"10.245.1.2"}
|
||||
export KUBE_MASTER_IP=${MASTER_IP}
|
||||
|
||||
export INSTANCE_PREFIX="kubernetes"
|
||||
export MASTER_NAME="${INSTANCE_PREFIX}-master"
|
||||
|
||||
# Map out the IPs, names and container subnets of each minion
|
||||
export MINION_IP_BASE="10.245.1."
|
||||
export MINION_IP_BASE=${MINION_IP_BASE-"10.245.1."}
|
||||
MINION_CONTAINER_SUBNET_BASE="10.246"
|
||||
MASTER_CONTAINER_NETMASK="255.255.255.0"
|
||||
MASTER_CONTAINER_ADDR="${MINION_CONTAINER_SUBNET_BASE}.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user