You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cluster_spec.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,6 +181,40 @@ etcdClusters:
181
181
182
182
The etcd version used by kOps follows the recommended etcd version for the given kubernetes version. It is possible to override this by adding the `version` key to each of the etcd clusters.
To run an etcd version that kOps does not bundle, set both `version` and `image` on each of the etcd clusters. When `image` is set, the etcd and etcdctl binaries for `version` are sourced from that image instead of the default `registry.k8s.io/etcd` image. The image must contain `/usr/local/bin/etcd` and `/usr/local/bin/etcdctl` matching `version`, like the official `gcr.io/etcd-development/etcd` images do, and must provide the architectures of the control-plane nodes.
188
+
189
+
```yaml
190
+
etcdClusters:
191
+
- etcdMembers:
192
+
- instanceGroup: master-us-east-1a
193
+
name: a
194
+
image: gcr.io/etcd-development/etcd:v3.6.99
195
+
name: main
196
+
version: 3.6.99
197
+
- etcdMembers:
198
+
- instanceGroup: master-us-east-1a
199
+
name: a
200
+
image: gcr.io/etcd-development/etcd:v3.6.99
201
+
name: events
202
+
version: 3.6.99
203
+
```
204
+
205
+
The same fields can be set when creating a cluster:
Both `version` and `image` must be set together. When a custom image is set, only the binaries for the selected version are made available to etcd-manager; restoring backups, which can require the binaries of a bundled version, is not supported.
215
+
216
+
Note that versions not bundled by kOps have not been tested with kOps and that all etcd clusters of a Kubernetes cluster must run the same etcd version. A custom image can only be set when creating a new cluster: once the etcd cluster exists, the image cannot be added, changed or removed, and the version cannot be changed while an image is set.
217
+
184
218
### The `leases` etcd shard for megaclusters
185
219
186
220
kOps supports configuring an optional `leases` etcd shard. This shard is specifically designed for megaclusters to isolate the massive volume of high-frequency write traffic generated by node heartbeats. By redirecting this traffic to a dedicated `leases` shard, it prevents the primary etcd database from being overwhelmed, ensuring overall control plane stability.
Copy file name to clipboardExpand all lines: pkg/apis/kops/validation/validation.go
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1535,6 +1535,9 @@ func validateEtcdClusterSpec(spec kops.EtcdClusterSpec, c *kops.Cluster, fieldPa
1535
1535
// Not technically a requirement, but doesn't really make sense to allow
1536
1536
allErrs=append(allErrs, field.Invalid(fieldPath.Child("etcdMembers"), len(spec.Members), "Should be an odd number of control-plane-zones for quorum. Use --zones and --control-plane-zones to declare node zones and control-plane zones separately"))
1537
1537
}
1538
+
ifspec.Image!=""&&spec.Version=="" {
1539
+
allErrs=append(allErrs, field.Required(fieldPath.Child("version"), "version must be set when image is set"))
klog.Warningf("etcd version %q is not known to be supported, but ignoring because of SkipEtcdVersionCheck feature flag", etcdCluster.Version)
67
+
ifetcdCluster.Image!="" {
68
+
klog.Warningf("etcd version %q is not bundled by kOps and has not been tested; using binaries from custom image %q", etcdCluster.Version, etcdCluster.Image)
70
69
} else {
71
70
klog.Warningf("Unsupported etcd version %q detected; please update etcd version.", etcdCluster.Version)
72
-
klog.Warningf("Use export KOPS_FEATURE_FLAGS=SkipEtcdVersionCheck to override this check.")
returnfmt.Errorf("etcd version %q is not supported with etcd-manager, please specify a supported version or remove the value to use the recommended version", etcdCluster.Version)
76
+
returnfmt.Errorf("etcd version %q is not supported with etcd-manager, please specify a supported version, remove the value to use the recommended version, or also set the image field to run a custom version", etcdCluster.Version)
0 commit comments