{"record":{"id":"6dfdedad15e6bd5e","repo":"kubernetes/kops","slug":"must-specify-a-zone-for-instancegroup-q-used-by-e","errorCode":null,"errorMessage":"must specify a zone for instancegroup %q used by etcd %s/%s","messagePattern":"must specify a zone for instancegroup %q used by etcd (.+?)/(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/master_volumes.go","lineNumber":87,"sourceCode":"\t\t\t// EBS volume for each member of each etcd cluster\n\t\t\tprefix := m.Name + \".etcd-\" + etcd.Name\n\t\t\tname := prefix + \".\" + b.ClusterName()\n\n\t\t\tigName := fi.ValueOf(m.InstanceGroup)\n\t\t\tif igName == \"\" {\n\t\t\t\treturn fmt.Errorf(\"InstanceGroup not set on etcd %s/%s\", m.Name, etcd.Name)\n\t\t\t}\n\t\t\tig := b.FindInstanceGroup(igName)\n\t\t\tif ig == nil {\n\t\t\t\treturn fmt.Errorf(\"InstanceGroup not found (for etcd %s/%s): %q\", m.Name, etcd.Name, igName)\n\t\t\t}\n\n\t\t\tzones, err := model.FindZonesForInstanceGroup(b.Cluster, ig)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif len(zones) == 0 {\n\t\t\t\treturn fmt.Errorf(\"must specify a zone for instancegroup %q used by etcd %s/%s\", igName, m.Name, etcd.Name)\n\t\t\t}\n\t\t\tif len(zones) != 1 {\n\t\t\t\treturn fmt.Errorf(\"must specify a unique zone for instancegroup %q used by etcd %s/%s\", igName, m.Name, etcd.Name)\n\t\t\t}\n\t\t\tzone := zones[0]\n\n\t\t\tvolumeSize := fi.ValueOf(m.VolumeSize)\n\t\t\tif volumeSize == 0 {\n\t\t\t\tvolumeSize = DefaultEtcdVolumeSize\n\t\t\t}\n\n\t\t\tvar allMembers []string\n\t\t\tfor _, m := range etcd.Members {\n\t\t\t\tallMembers = append(allMembers, m.Name)\n\t\t\t}\n\t\t\tsort.Strings(allMembers)\n\n\t\t\tswitch b.Cluster.GetCloudProvider() {","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/master_volumes.go#L69-L105","documentation":"Raised during cloudup model build when the instance group backing an etcd cluster member resolves to zero zones. FindZonesForInstanceGroup inspects the cluster spec's subnets for the IG and etcd members require a concrete zone to place their persistent volume, so an IG with no matching subnets cannot be used for etcd.","triggerScenarios":"Thrown at pkg/model/master_volumes.go:87 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add subnets to the instance group (or cluster spec) whose zones cover the etcd members","Ensure the etcd instance group is listed in spec.etcdClusters[*].members[*].instanceGroup and has zones assigned","Run `kops edit cluster` and verify the etcd members' instance groups map to subnets with zones"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}