All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Manage Services

Last updated:2021-05-11 10:39:26

A Kubernetes Service abstracts the policies for accessing a set of pods. It shields dynamic changes of backend pods and multi-pod load balancing, and manages Service access over the Layer 4 network in a cluster. A serverless cluster does not contain actual nodes. Therefore, node-related access methods are unavailable. Services in a serverless cluster can be exposed through Cluster IP, SLB.

  • ClusterIP: Fixed virtual IP addresses (cluster IP addresses) are allocated to common Services in a Kubernetes cluster so that the Services can be accessed within the cluster.
  • LoadBalancer: The pods in a Service act as backend real servers of SLB and can be exposed through SLB to enable public access and intra-VPC access.

Create a Service

You can set the access method of an associated Service when you create a workload or associate a Service with a workload when you create the Service. To create a Service, perform the following steps:

  1. Log in to the KCE console.

  2. In the left navigation pane, click ServerlessCluster. The cluster management page appears.

  3. Click the ID of the cluster in which you want to create a Service. The cluster details page appears.

  4. In the left navigation pane, choose Service Management > Service. On the service list page, click Create.

  5. Set the name, namespace, and other basic information of the Service.

  6. Set the access method. Two access methods are available for a serverless cluster. For more information, see the following table.

  7. Set the associated workload in two ways: Set Selector Manually or Refer to the workload.

  8. Click Create.

    Access method Service type Description
    Public Access(LoadBalancer) LoadBalancer - This option allows Services to be exposed to the Internet through SLB so that they can be accessed over the Internet. The serverless cluster will automatically create a public SLB instance and an EIP to perform dynamic mounting and synchronization of listeners.
    - The Service can be accessed over the Internet through the IP address of the SLB instance and a service port. For more information, see Access Services by using SLB.
    Via VPC(LoadBalancer) LoadBalancer - This option allows Services to be exposed to the VPC where the Kubernetes cluster resides through SLB so that they can be accessed by other resources or Kubernetes clusters in the VPC. The serverless cluster will automatically create a private SLB instance to perform dynamic mounting and synchronization of listeners.
    - The Service can be accessed in the VPC through the IP address of the SLB instance and a service port. For more information, see Access Services by using SLB.
    Intra-Cluster(ClusterIP) ClusterIP - This option allows Services to be exposed to the Kubernetes cluster so that they can be accessed by other Services or containers in the cluster.
    - You can access the Services in the cluster through the Service name and Service port.

    Other access configurations for different SLB types are described as follows:

  • Port Mapping: Specify the protocol and ports for accurately sending the configurations to listeners. Layer 4 protocols are supported. The default protocol is TCP. Container Port specifies the target port of backend pods. Service Port specifies the public service port of listeners.

image.png

  • SLB Subnet: Select the subnet where the SLB instance resides. This item is available when the access method is Via VPC(LoadBalancer). You can select an endpoint subnet in the VPC where the cluster resides.

  • Annotation Parameter: Add personalized configurations of SLB through annotations, for example, the bandwidth and billing mode of SLB. For more information, see Access Services by using SLB.

image.png

Basic operations

Update the access method

On the Service list page, click Update Access Method for a Service. On the Update Service page, update the access method and other access configurations.

Delete a Service

On the Service list page, click Delete for a Service. In the message that appears, click OK.

On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback