Skip to main content
Version: v1.10

MultiClusterService v1alpha1

apiVersion: networking.karmada.io/v1alpha1

import "github.com/karmada-io/karmada/pkg/apis/networking/v1alpha1"

MultiClusterService

MultiClusterService is a named abstraction of multi-cluster software service. The name field of MultiClusterService is the same as that of Service name. Services with the same name in different clusters are regarded as the same service and are associated with the same MultiClusterService. MultiClusterService can control the exposure of services to outside multiple clusters, and also enable service discovery between clusters.


  • apiVersion: networking.karmada.io/v1alpha1

  • kind: MultiClusterService

  • metadata (ObjectMeta)

  • spec (MultiClusterServiceSpec), required

    Spec is the desired state of the MultiClusterService.

  • status (ServiceStatus)

    Status is the current state of the MultiClusterService.

    ServiceStatus represents the current status of a service.

    • status.conditions ([]Condition)

      Patch strategy: merge on key type

      Map: unique values on key type will be kept during a merge

      Current service state

      Condition contains details for one aspect of the current state of this API Resource.

      • status.conditions.lastTransitionTime (Time), required

        lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.

        Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

      • status.conditions.message (string), required

        message is a human readable message indicating details about the transition. This may be an empty string.

      • status.conditions.reason (string), required

        reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.

      • status.conditions.status (string), required

        status of the condition, one of True, False, Unknown.

      • status.conditions.type (string), required

        type of condition in CamelCase or in foo.example.com/CamelCase.

      • status.conditions.observedGeneration (int64)

        observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.

    • status.loadBalancer (LoadBalancerStatus)

      LoadBalancer contains the current status of the load-balancer, if one is present.

      LoadBalancerStatus represents the status of a load-balancer.

      • status.loadBalancer.ingress ([]LoadBalancerIngress)

        Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.

        LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.

        • status.loadBalancer.ingress.hostname (string)

          Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)

        • status.loadBalancer.ingress.ip (string)

          IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)

        • status.loadBalancer.ingress.ipMode (string)

          IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. Setting this to "VIP" indicates that traffic is delivered to the node with the destination set to the load-balancer's IP and port. Setting this to "Proxy" indicates that traffic is delivered to the node or pod with the destination set to the node's IP and node port or the pod's IP and port. Service implementations may use this information to adjust traffic routing.

        • status.loadBalancer.ingress.ports ([]PortStatus)

          Atomic: will be replaced during a merge

          Ports is a list of records of service ports If used, every port defined in the service should have an entry in it

          **

          • status.loadBalancer.ingress.ports.port (int32), required

            Port is the port number of the service port of which status is recorded here

          • status.loadBalancer.ingress.ports.protocol (string), required

            Protocol is the protocol of the service port of which status is recorded here The supported values are: "TCP", "UDP", "SCTP"

            Possible enum values:

            • "SCTP" is the SCTP protocol.
            • "TCP" is the TCP protocol.
            • "UDP" is the UDP protocol.
          • status.loadBalancer.ingress.ports.error (string)

            Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use CamelCase names

            • cloud provider specific error values must have names that comply with the format foo.example.com/CamelCase.

MultiClusterServiceSpec

MultiClusterServiceSpec is the desired state of the MultiClusterService.


  • types ([]string), required

    Types specifies how to expose the service referencing by this MultiClusterService.

  • consumerClusters ([]ClusterSelector)

    ConsumerClusters specifies the clusters where the service will be exposed, for clients. If leave it empty, the service will be exposed to all clusters.

    ClusterSelector specifies the cluster to be selected.

    • consumerClusters.name (string)

      Name is the name of the cluster to be selected.

  • ports ([]ExposurePort)

    Ports is the list of ports that are exposed by this MultiClusterService. No specified port will be filtered out during the service exposure and discovery process. All ports in the referencing service will be exposed by default.

    ExposurePort describes which port will be exposed.

    • ports.port (int32), required

      Port specifies the exposed service port.

    • ports.name (string)

      Name is the name of the port that needs to be exposed within the service. The port name must be the same as that defined in the service.

  • providerClusters ([]ClusterSelector)

    ProviderClusters specifies the clusters which will provide the service backend. If leave it empty, we will collect the backend endpoints from all clusters and sync them to the ConsumerClusters.

    ClusterSelector specifies the cluster to be selected.

    • providerClusters.name (string)

      Name is the name of the cluster to be selected.

  • range (ExposureRange)

    Range specifies the ranges where the referencing service should be exposed. Only valid and optional in case of Types contains CrossCluster. If not set and Types contains CrossCluster, all clusters will be selected, that means the referencing service will be exposed across all registered clusters. Deprecated: in favor of ProviderClusters/ConsumerClusters.

    ExposureRange describes a list of clusters where the service is exposed. Now supports selecting cluster by name, leave the room for extend more methods such as using label selector.

    • range.clusterNames ([]string)

      ClusterNames is the list of clusters to be selected.

  • serviceConsumptionClusters ([]string)

    ServiceConsumptionClusters specifies the clusters where the service will be exposed, for clients. If leave it empty, the service will be exposed to all clusters. Deprecated: in favor of ProviderClusters/ConsumerClusters.

  • serviceProvisionClusters ([]string)

    ServiceProvisionClusters specifies the clusters which will provision the service backend. If leave it empty, we will collect the backend endpoints from all clusters and sync them to the ServiceConsumptionClusters. Deprecated: in favor of ProviderClusters/ConsumerClusters.

MultiClusterServiceList

MultiClusterServiceList is a collection of MultiClusterService.


  • apiVersion: networking.karmada.io/v1alpha1

  • kind: MultiClusterServiceList

  • metadata (ListMeta)

  • items ([][MultiClusterService](../networking-resources/multi-cluster-service-v1alpha1#multiclusterservice)), required

    Items is the list of MultiClusterService.

Operations


get read the specified MultiClusterService

HTTP Request

GET /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices/{name}

Parameters

  • name (in path): string, required

    name of the MultiClusterService

  • namespace (in path): string, required

    namespace

  • pretty (in query): string

    pretty

Response

200 (MultiClusterService): OK

get read status of the specified MultiClusterService

HTTP Request

GET /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices/{name}/status

Parameters

  • name (in path): string, required

    name of the MultiClusterService

  • namespace (in path): string, required

    namespace

  • pretty (in query): string

    pretty

Response

200 (MultiClusterService): OK

list list or watch objects of kind MultiClusterService

HTTP Request

GET /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices

Parameters

Response

200 (MultiClusterServiceList): OK

list list or watch objects of kind MultiClusterService

HTTP Request

GET /apis/networking.karmada.io/v1alpha1/multiclusterservices

Parameters

Response

200 (MultiClusterServiceList): OK

create create a MultiClusterService

HTTP Request

POST /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices

Parameters

Response

200 (MultiClusterService): OK

201 (MultiClusterService): Created

202 (MultiClusterService): Accepted

update replace the specified MultiClusterService

HTTP Request

PUT /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices/{name}

Parameters

  • name (in path): string, required

    name of the MultiClusterService

  • namespace (in path): string, required

    namespace

  • body: MultiClusterService, required

Response

200 (MultiClusterService): OK

201 (MultiClusterService): Created

update replace status of the specified MultiClusterService

HTTP Request

PUT /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices/{name}/status

Parameters

  • name (in path): string, required

    name of the MultiClusterService

  • namespace (in path): string, required

    namespace

  • body: MultiClusterService, required

Response

200 (MultiClusterService): OK

201 (MultiClusterService): Created

patch partially update the specified MultiClusterService

HTTP Request

PATCH /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices/{name}

Parameters

  • name (in path): string, required

    name of the MultiClusterService

  • namespace (in path): string, required

    namespace

  • body: Patch, required

Response

200 (MultiClusterService): OK

201 (MultiClusterService): Created

patch partially update status of the specified MultiClusterService

HTTP Request

PATCH /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices/{name}/status

Parameters

  • name (in path): string, required

    name of the MultiClusterService

  • namespace (in path): string, required

    namespace

  • body: Patch, required

Response

200 (MultiClusterService): OK

201 (MultiClusterService): Created

delete delete a MultiClusterService

HTTP Request

DELETE /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices/{name}

Parameters

  • name (in path): string, required

    name of the MultiClusterService

  • namespace (in path): string, required

    namespace

  • body: DeleteOptions

Response

200 (Status): OK

202 (Status): Accepted

deletecollection delete collection of MultiClusterService

HTTP Request

DELETE /apis/networking.karmada.io/v1alpha1/namespaces/{namespace}/multiclusterservices

Parameters

Response

200 (Status): OK