@@ -93,9 +93,9 @@ tags, and then generate with `hack/update-toc.sh`.
93
93
- [ Exporting Services] ( #exporting-services )
94
94
- [ Restricting Exports] ( #restricting-exports )
95
95
- [ Importing Services] ( #importing-services )
96
- - [ Supercluster Service Behavior Expectations] ( #supercluster -service-behavior-expectations )
96
+ - [ ClusterSet Service Behavior Expectations] ( #clusterset -service-behavior-expectations )
97
97
- [ Service Types] ( #service-types )
98
- - [ SuperclusterIP ] ( #superclusterip )
98
+ - [ ClusterSetIP ] ( #clustersetip )
99
99
- [ DNS] ( #dns )
100
100
- [ EndpointSlice] ( #endpointslice )
101
101
- [ Endpoint TTL] ( #endpoint-ttl )
@@ -236,14 +236,14 @@ nitty-gritty.
236
236
-->
237
237
#### Terminology
238
238
239
- - ** supercluster ** - A placeholder name for a group of clusters with a high
239
+ - ** clusterset ** - A placeholder name for a group of clusters with a high
240
240
degree of mutual trust and shared ownership that share services amongst
241
- themselves. Membership in a supercluster is symmetric and transitive. The set
241
+ themselves. Membership in a clusterset is symmetric and transitive. The set
242
242
of member clusters are mutually aware, and agree about their collective
243
- association. Within a supercluster , [ namespace sameness] applies and all
243
+ association. Within a clusterset , [ namespace sameness] applies and all
244
244
namespaces with a given name are considered to be the same namespace.
245
245
Implementations of this API are responsible for defining and tracking
246
- membership in a supercluster . The specific mechanism is out of scope of this
246
+ membership in a clusterset . The specific mechanism is out of scope of this
247
247
proposal.
248
248
- ** mcs-controller** - A controller that syncs services across clusters and
249
249
makes them available for multi-cluster service discovery and connectivity.
@@ -255,27 +255,27 @@ nitty-gritty.
255
255
- ** cluster name** - A unique name or identifier for the cluster, scoped to the
256
256
implementation's cluster registry. We do not attempt to define the registry.
257
257
Each cluster must have a name that can uniquely identify it within the
258
- supercluster . A cluster name must be a valid [ RFC
258
+ clusterset . A cluster name must be a valid [ RFC
259
259
1123] ( https://tools.ietf.org/html/rfc1123 ) DNS label.
260
260
261
261
The cluster name should be consistent for the life of a cluster and its
262
- membership in the supercluster . Implementations should treat name mutation as
262
+ membership in the clusterset . Implementations should treat name mutation as
263
263
a delete of the membership followed by recreation with the new name.
264
264
265
265
[ namespace sameness ] : https://github.com/kubernetes/community/blob/master/sig-multicluster/namespace-sameness-position-statement.md
266
266
267
267
We propose a new CRD called ` ServiceExport ` , used to specify which services
268
- should be exposed across all clusters in the supercluster . ` ServiceExports ` must
268
+ should be exposed across all clusters in the clusterset . ` ServiceExports ` must
269
269
be created in each cluster that the underlying ` Service ` resides in. Creation of
270
270
a ` ServiceExport ` in a cluster will signify that the ` Service ` with the same
271
271
name and namespace as the export should be visible to other clusters in the
272
- supercluster .
272
+ clusterset .
273
273
274
274
Another CRD called ` ServiceImport ` will be introduced to act as the in-cluster
275
275
representation of a multi-cluster service in each importing cluster. This is
276
276
analogous to the traditional ` Service ` type in Kubernetes. Importing clusters
277
277
will have a corresponding ` ServiceImport ` for each uniquely named ` Service ` that
278
- has been exported within the supercluster , referenced by namespaced name.
278
+ has been exported within the clusterset , referenced by namespaced name.
279
279
` ServiceImport ` resources will be managed by the MCS implementation's
280
280
mcs-controller.
281
281
@@ -366,7 +366,7 @@ proposal will be implemented, this is the place to discuss them.
366
366
-->
367
367
### Exporting Services
368
368
369
- Services will not be visible to other clusters in the supercluster by default.
369
+ Services will not be visible to other clusters in the clusterset by default.
370
370
They must be explicitly marked for export by the user. This allows users to
371
371
decide exactly which services should be visible outside of the local cluster.
372
372
@@ -377,7 +377,7 @@ should be automatically exported by default. In that case, a `ServiceExport`
377
377
could be automatically created for all ` Services ` . This tooling will be designed
378
378
in a separate doc, and is secondary to the main API proposed here.
379
379
380
- To mark a service for export to the supercluster , a user will create a
380
+ To mark a service for export to the clusterset , a user will create a
381
381
ServiceExport CR:
382
382
383
383
``` golang
@@ -453,21 +453,21 @@ status:
453
453
- type : Conflict
454
454
status : " True"
455
455
lastTransitionTime : " 2020-03-30T01:33:55Z"
456
- message : " Conflicting type. Using \" SuperclusterIP \" from oldest service export in \" cluster-1\" . 2/5 clusters disagree."
456
+ message : " Conflicting type. Using \" ClusterSetIP \" from oldest service export in \" cluster-1\" . 2/5 clusters disagree."
457
457
` ` `
458
458
459
459
To export a service, a ` ServiceExport` should be created within the cluster and
460
460
namespace that the service resides in, name-mapped to the service for export -
461
461
that is, they reference the `Service` with the same name as the export. If
462
- multiple clusters within the supercluster have `ServiceExports` with the same
462
+ multiple clusters within the clusterset have `ServiceExports` with the same
463
463
name and namespace, these will be considered the same service and will be
464
- combined at the supercluster level.
464
+ combined at the clusterset level.
465
465
466
466
_Note : A `Service` without a corresponding `ServiceExport` in its local cluster
467
467
will not be exported even if other clusters are exporting a `Service` with the
468
468
same namespaced name._
469
469
470
- This requires that within a supercluster , a given namespace is governed by a
470
+ This requires that within a clusterset , a given namespace is governed by a
471
471
single authority across all clusters. It is that authority’s responsibility to
472
472
ensure that a name is shared by multiple services within the namespace if and
473
473
only if they are instances of the same service.
@@ -489,11 +489,11 @@ unless there is a clear use case.
489
489
490
490
# ## Importing Services
491
491
492
- To consume a supercluster service, the domain name associated with the
492
+ To consume a clusterset service, the domain name associated with the
493
493
mutli-cluster service should be used (see [DNS](#dns)). When the mcs-controller
494
494
sees a `ServiceExport`, a `ServiceImport` will be introduced in each importing
495
495
cluster to represent the imported service. Users are primarily expected to
496
- consume the service via domain name and supercluster VIP, but the
496
+ consume the service via domain name and clusterset VIP, but the
497
497
` ServiceImport` may be used for imported service discovery via the K8s API and
498
498
will be used internally as the source of truth for routing and DNS
499
499
configuration.
@@ -518,7 +518,7 @@ the lifecycle of a `ServiceImport`.
518
518
519
519
For each exported service, one `ServiceExport` will exist in each cluster that
520
520
exports the service. The mcs-controller will create and maintain a derived
521
- ` ServiceImport` in each cluster within the supercluster so long as the service's
521
+ ` ServiceImport` in each cluster within the clusterset so long as the service's
522
522
namespace exists (see : [constraints and conflict
523
523
resolution](#constraints-and-conflict-resolution)). If all `ServiceExport`
524
524
instances are deleted, each `ServiceImport` will also be deleted from all
@@ -539,7 +539,7 @@ cluster.
539
539
The mcs-controller is responsible for managing imported `EndpointSlice`s.
540
540
541
541
` ` ` golang
542
- // ServiceImport describes a service imported from clusters in a supercluster .
542
+ // ServiceImport describes a service imported from clusters in a clusterset .
543
543
type ServiceImport struct {
544
544
metav1.TypeMeta ` json:",inline"`
545
545
// +optional
@@ -554,8 +554,8 @@ type ServiceImport struct {
554
554
type ServiceImportType string
555
555
556
556
const (
557
- // SuperclusterIP are only accessible via the Supercluster IP.
558
- SuperclusterIP ServiceImportType = "SuperclusterIP "
557
+ // ClusterSetIP are only accessible via the ClusterSet IP.
558
+ ClusterSetIP ServiceImportType = "ClusterSetIP "
559
559
// Headless services allow backend pods to be addressed directly.
560
560
Headless ServiceImportType = "Headless"
561
561
)
@@ -626,7 +626,7 @@ metadata:
626
626
namespace : my-ns
627
627
spec :
628
628
ip : 42.42.42.42
629
- type : " SuperclusterIP "
629
+ type : " ClusterSetIP "
630
630
ports :
631
631
- name : http
632
632
protocol : TCP
@@ -666,15 +666,15 @@ endpoints:
666
666
The ` ServiceImport.Spec.IP` (VIP) can be used to access this service from within
667
667
this cluster.
668
668
669
- # ## Supercluster Service Behavior Expectations
669
+ # ## ClusterSet Service Behavior Expectations
670
670
671
671
# ### Service Types
672
672
673
673
- `ClusterIP` : This is the straightforward case most of the proposal assumes.
674
674
Each `EndpointSlice` associated with the exported service is combined with
675
- slices from other clusters to make up the supercluster service. They will be
676
- imported to the cluster behind the supercluster IP, with a `ServiceImport` of
677
- type `SuperclusterIP `. [Details](#EndpointSlice)
675
+ slices from other clusters to make up the clusterset service. They will be
676
+ imported to the cluster behind the clusterset IP, with a `ServiceImport` of
677
+ type `ClusterSetIP `. [Details](#EndpointSlice)
678
678
- `ClusterIP : none` (Headless): Headless services are supported and will be
679
679
imported with a `ServiceImport` and `EndpointSlices` like any other
680
680
` ClusterIP` service, but do not configure a VIP and must be consumed via
@@ -684,15 +684,15 @@ this cluster.
684
684
policy](#constraints-and-conflict-resolution).
685
685
686
686
_Exporting a non-headless service to an otherwise headless service can
687
- dynamically change the supercluster service type when an old export is
687
+ dynamically change the clusterset service type when an old export is
688
688
removed, potentially breaking existing consumers. This is likely the result of
689
689
a deployment error. Conditions and events on the `ServiceExport` will be used
690
690
to communicate conflicts to the user._
691
691
- `NodePort` and `LoadBalancer` : These create `ClusterIP` services that would
692
692
sync as expected. For example If you export a `NodePort` service, the
693
- resulting cross-cluster service will still be a supercluster IP type. The
693
+ resulting cross-cluster service will still be a clusterset IP type. The
694
694
local service will not be affected. Node ports can still be used to access the
695
- cluster-local service in the source cluster, and only the supercluster IP will
695
+ cluster-local service in the source cluster, and only the clusterset IP will
696
696
route to endpoints in remote clusters.
697
697
- `ExternalName` : It doesn't make sense to export an `ExternalName` service.
698
698
They can't be merged with other exports, and it seems like it would only
@@ -701,11 +701,11 @@ this cluster.
701
701
cluster individually. If a `ServiceExport` is created for an `ExternalName`
702
702
service, an `InvalidService` condition will be set on the export.
703
703
704
- # ### SuperclusterIP
704
+ # ### ClusterSetIP
705
705
706
706
A non-headless `ServiceImport` is expected to have an associated IP address, the
707
- supercluster IP, which may be accessed from within an importing cluster. This IP
708
- may be a single IP used supercluster -wide or assigned on a per-cluster basis,
707
+ clusterset IP, which may be accessed from within an importing cluster. This IP
708
+ may be a single IP used clusterset -wide or assigned on a per-cluster basis,
709
709
but is expected to be consistent for the life of a `ServiceImport` from the
710
710
perspective of the importing cluster. Requests to this IP from within a cluster
711
711
will route to backends for the aggregated Service.
@@ -727,20 +727,20 @@ https://github.com/kubernetes/dns/blob/master/docs/specification.md
727
727
<<[ UNRESOLVED] >>
728
728
```
729
729
When a `ServiceExport` is created, this will cause a domain name for the
730
- multi-cluster service to become accessible from within the supercluster . The
731
- domain name will be `<service>.<ns>.svc.supercluster .local`.
730
+ multi-cluster service to become accessible from within the clusterset . The
731
+ domain name will be `<service>.<ns>.svc.clusterset .local`.
732
732
733
- **SuperclusterIP services:** Requests to this domain name from within an importing
734
- cluster will resolve to the supercluster IP, which points to endpoints for pods
735
- within the underlying `Service`(s) across the supercluster .
733
+ **ClusterSetIP services:** Requests to this domain name from within an importing
734
+ cluster will resolve to the clusterset IP, which points to endpoints for pods
735
+ within the underlying `Service`(s) across the clusterset .
736
736
737
- **Headless services:** Within an importing cluster, the supercluster domain name
737
+ **Headless services:** Within an importing cluster, the clusterset domain name
738
738
will have multiple `A`/`AAAA` records, each containing the address of a ready
739
- endpoint of the headless service. `<service>.<ns>.svc.supercluster .local` will
739
+ endpoint of the headless service. `<service>.<ns>.svc.clusterset .local` will
740
740
resolve to the set of all ready pod IPs for the service.
741
741
742
- Pods backing a supercluster service may be addressed individually using the
743
- `<hostname>.<clustername>.<svc>.<ns>.svc.supercluster .local` format. Necessary
742
+ Pods backing a clusterset service may be addressed individually using the
743
+ `<hostname>.<clustername>.<svc>.<ns>.svc.clusterset .local` format. Necessary
744
744
records will be created based on each ready endpoint's hostname and the
745
745
`multicluster.kubernetes.io/source-cluster` label on the `EndpointSlice`. This
746
746
allows naming collisions to be avoided for headless services backed by identical
@@ -750,24 +750,24 @@ _Note: the total length of a FQDN is limited to 253 characters. Each label is
750
750
independently limited to 63 characters, so users must choose host/cluster/service
751
751
names to avoid hitting this upper bound._
752
752
753
- All service consumers must use the `*.svc.supercluster .local` name to enable
754
- supercluster routing, even if there is a matching `Service` with the same
753
+ All service consumers must use the `*.svc.clusterset .local` name to enable
754
+ clusterset routing, even if there is a matching `Service` with the same
755
755
namespaced name in the local cluster. This name allows service consumers to
756
756
opt-in to multi-cluster behavior. There will be no change to existing behavior
757
757
of the `cluster.local` zone.
758
758
759
- _It is expected that the `.supercluster .local` zone is standard and available in
759
+ _It is expected that the `.clusterset .local` zone is standard and available in
760
760
all implementations, but customization and/or alising can be explored if there's
761
761
demand._
762
762
763
763
#### EndpointSlice
764
764
765
765
When a `ServiceExport` is created, this will cause `EndpointSlice` objects for
766
- the underlying `Service` to be created in each importing cluster within the supercluster ,
766
+ the underlying `Service` to be created in each importing cluster within the clusterset ,
767
767
associated with the derived `ServiceImport`. One or more `EndpointSlice`
768
768
resources will exist for the exported `Service`, with each `EndpointSlice`
769
769
containing only endpoints from a single source cluster. These `EndpointSlice`
770
- objects will be marked as managed by the supercluster service controller, so
770
+ objects will be marked as managed by the clusterset service controller, so
771
771
that the endpoint slice controller doesn’t delete them. `EndpointSlices` will
772
772
have an owner reference to their associated `ServiceImport`.
773
773
@@ -814,9 +814,9 @@ The conflict will be resolved by assigning precedence based on each
814
814
815
815
#### Service Port
816
816
817
- A derived service will be accessible with the supercluster IP at the ports
817
+ A derived service will be accessible with the clusterset IP at the ports
818
818
dictated by child services. If the external properties of service ports for a
819
- set of exported services don’t match, the supercluster service will expose the
819
+ set of exported services don’t match, the clusterset service will expose the
820
820
union of service ports declared on its constituent services. Should a port name
821
821
be used for multiple non-identical (`port`, `protocol`, `appProtocol`) service
822
822
ports by different constituent services, the conflict resolution policy will
@@ -978,6 +978,11 @@ enhancement:
978
978
979
979
## Implementation History
980
980
981
+ - 2020-02-05 - Initial Proposal
982
+ - 2020-05-10 - Merged as provisional
983
+ - 2020-06-22 - Moved to implementable
984
+ - 2020-08-04 - ClusterSet name finalized
985
+ - 2020-08-10 - Alpha implementation available at [sigs.k8s.io/mcs-api](http://sigs.k8s.io/mcs-api)
981
986
<!--
982
987
Major milestones in the life cycle of a KEP should be tracked in this section.
983
988
Major milestones might include
@@ -1046,7 +1051,7 @@ retain the flexibility of selectors.
1046
1051
`ServiceExport` as described has no spec and seems like it could just be
1047
1052
replaced with an annotation, e.g. `multicluster.kubernetes.io/export`. When a
1048
1053
service is found with the annotation, it would be considered marked for export
1049
- to the supercluster . The controller would then create `EndpointSlices` and an
1054
+ to the clusterset . The controller would then create `EndpointSlices` and an
1050
1055
`ServiceImport` in each cluster exactly as described above. Unfortunately,
1051
1056
`Service` does not have an extensible status and there is no way to represent
1052
1057
the state of the export on the annotated `Service`. We could extend
0 commit comments