All Products
Search
Document Center

Container Service for Kubernetes:Use MCS in the ACK One console

Last Updated:Mar 27, 2024

The multi-cluster Services (MCS) feature allows you to access Services across Kubernetes clusters without the need to create load balancers. This topic describes how to use the MCS feature in the Distributed Cloud Container Platform for Kubernetes (ACK One) console.

Overview

The MCS feature allows you to access Services across Kubernetes clusters. The following figure shows the architecture of the MCS feature.

多集群服务

  1. The administrator deployed application resources, such as namespaces, Deployments, and Services, in a Service provider cluster (ACK Cluster 1) and a Service consumer cluster (ACK Cluster 2). The administrator also created MCS resources, including a ServiceExport and a ServiceImport.

  2. The Fleet instance listens on the ServiceExport and ServiceImport in the associated ACK clusters, and synchronizes the MCS endpoint information.

  3. The client pod in ACK Cluster 2 can access Service 1 in ACK Cluster 1.

Prerequisites

  • The Fleet management feature is enabled. For more information, see Enable Fleet management.

  • Two clusters (the service provider cluster and service consumer cluster) are associated with the Fleet instance. For more information, see Associate clusters with a Fleet instance.

  • The Kubernetes versions of the associated clusters are 1.21 or later.

Create a multi-cluster Service

  1. Create a namespace named provider-ns on the Fleet instance. To do this, run the following command:

    kubectl create ns provider-ns

    This command creates a namespace named provider-ns. You can specify a custom name.

  2. Log on to the ACK One console. In the left-side navigation pane, choose Fleet > MCS.

  3. On the MCS page, click Create Multi-cluster Service.

  4. In the Create Multi-cluster Service panel, configure the Service Provider Cluster and Namespace parameters, and select a Service in the Available Services section. Select a cluster from the Service Consumer Cluster drop-down list. Then, click OK.

    create

    On the MCS page, you can view information about the Service that you selected.

Delete a multi-cluster Service

On the MCS page, find the Service that you want to delete and click Delete in the Actions column.