1. Check whether the service is successfully created.
    1. Log on to the Container Service console. In the left-side navigation pane, choose Ingresses and Load Balancing > Services. On the Services page, verify that the gateway-swarm-slb service is displayed and its type is NodePort.
  2. Check whether the service is running normally.

    You can log on to an ECS instance in the Kubernetes cluster and send a request to the NodePort service to see whether the service is accessible. In this example, the service uses port 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 cluster Kubernetes-piggymetrics-cluster and click the ID of the target ECS instance.
    2. On the Instance Details page that appears, click Connect to log on to the instance.
    3. Use commands such as ping, telnet, or wget to connect to 192.168.0.251:30080 and check whether the NodePort service is running normally.
      Container Service automatically creates a security group for ECS instances in one cluster. By default, only IP addresses within the Pod CIDR block can access services running on cluster nodes. You cannot access the NodePort service from outside the cluster. Therefore, an ECS instance in the cluster is used to access the NodePort service in this example. To view security group settings, use the following steps.
      1. Log on to the Elastic Compute Service console. In the left-side navigation pane, choose Network & Security > Security Groups. Select the target security group and click Add Rules in the Actions column.
      2. On the Security Group Rules page that appears, click the Inbound tab and the allowed CIDR block is displayed in the Authorization Object column.
    After you make sure that the NodePort service is running normally, you need to Configure the SLB instance attached to the Swarm cluster and mount the NodePort service to the backend of the SLB instance.