- Check whether the service is created.
- Log on to the Container Service for Kubernetes console. In the left-side navigation pane, choose . On the Services page, the gateway-swarm-slb service is displayed as a NodePort.
- 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.
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.
- In the left-side navigation pane, choose Nodes page, select the Kubernetes-piggymetrics-cluster cluster and click its ID.. On the
- On the Instance Details page, click Connect to log on to the instance.
- 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.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:
- Log on to the ECS console. In the left-side navigation pane, choose . On the Security Groups page, find the security group and click Add Rules in the Actions column.
- On the Security Group Rules page, click the Inbound tab and view the IP addresses and ports included in the security group.
How helpful was this page?
What might be the problems?