mirror of https://github.com/kubernetes/kops.git
Don't force HA master by default
Users can still get HA master by explicitly specifying a list of `--master-zones`. But HA master is not as well tested, is slower, needs more machines etc and we probably shouldn't silently force it as the default. Fix #33
This commit is contained in:
parent
188ca8339c
commit
9c07670d26
|
@ -80,7 +80,9 @@ You must pass --yes to actually delete resources (without the `#` comment!)
|
|||
|
||||
* Specify the k8s build to run: `--kubernetes-version=1.2.2`
|
||||
|
||||
* Try HA mode: `--zones=us-east-1b,us-east-1c,us-east-1d`
|
||||
* Run nodes in multiple zones: `--zones=us-east-1b,us-east-1c,us-east-1d`
|
||||
|
||||
* Run with a HA master: `--master-zones=us-east-1b,us-east-1c,us-east-1d`
|
||||
|
||||
* Specify the number of nodes: `--node-count=4`
|
||||
|
||||
|
|
|
@ -170,8 +170,9 @@ func (c *CreateClusterCmd) Run() error {
|
|||
|
||||
if c.MasterZones == "" {
|
||||
if len(masters) == 0 {
|
||||
// Default to putting into every zone
|
||||
// TODO: just the first 1 or 3 zones; or should we force users to declare?
|
||||
// We default to single-master (not HA), unless the user explicitly specifies it
|
||||
// HA master is a little slower, not as well tested yet, and requires more resources
|
||||
// Probably best not to make it the silent default!
|
||||
for _, zone := range cluster.Spec.Zones {
|
||||
g := &api.InstanceGroup{}
|
||||
g.Spec.Role = api.InstanceGroupRoleMaster
|
||||
|
@ -181,10 +182,14 @@ func (c *CreateClusterCmd) Run() error {
|
|||
g.Name = "master-" + zone.Name // Subsequent masters (if we support that) could be <zone>-1, <zone>-2
|
||||
instanceGroups = append(instanceGroups, g)
|
||||
masters = append(masters, g)
|
||||
|
||||
// Don't force HA master
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if len(masters) == 0 {
|
||||
// Use the specified master zones (this is how the user gets HA master)
|
||||
for _, zone := range parseZoneList(c.MasterZones) {
|
||||
g := &api.InstanceGroup{}
|
||||
g.Spec.Role = api.InstanceGroupRoleMaster
|
||||
|
|
Loading…
Reference in New Issue