1. Check whether the service is created.
    1. Log on to the Container Service for Kubernetes console. In the left-side navigation pane, choose Ingresses and Load Balancing > Services. On the Services page, the gateway-swarm-slb service is displayed as a NodePort.
  2. Check whether the service runs as expected.

    You can log on to an Elastic Compute Service (ECS) instance in the Container Service for Kubernetes (ACK) cluster. Then, send a request to the NodePort service to verify that the service is accessible. In this example, the service port is 30080 and the IP address of the ECS instance is 192.168.0.250.

    1. In the left-side navigation pane, choose Clusters > Nodes. On the Nodes page, select the Kubernetes-piggymetrics-cluster cluster and click its ID.
    2. On the Instance Details page, click Connect to log on to the instance.
    3. After you log on to the ECS instance with the IP address 192.168.0.250, run the ping, telnet, and wget commands to access 192.168.0.251:30080 and verify that the NodePort service runs as expected.
      NodePort Service
      ACK automatically creates a security group for ECS instances in the same ACK cluster. By default, only IP addresses within the pod CIDR blocks can access the ECS instances. You cannot access the ECS instances from outside the cluster. This limit is not applicable to service access through Server Load Balancer (SLB) instances. In this example, an ECS instance in the ACK cluster is used to access the NodePort service. To configure security groups, perform the following operations:
      1. Log on to the ECS console. In the left-side navigation pane, choose Network & Security > Security Groups. On the Security Groups page, find the security group and click Add Rules in the Actions column.
      2. On the Security Group Rules page, click the Inbound tab and view the IP addresses and ports included in the security group.
    After you verify that the NodePort service is running as expected, you must configure the SLB instance of the Container Service for Swarm cluster as described in Configure the SLB instance attached to the Swarm cluster and attach the NodePort service to the SLB instance.