If you do not enable SSH Logon when you create a cluster, you cannot connect to the cluster by using SSH or kubectl. To use SSH to connect to a cluster after it has been created, you can manually attach elastic IP addresses to your ECS instances, configure security group rules, and open the SSH port 22.
For how to enable SSH Logon when you create a cluster, see Bind an Elastic IP address to the API server during cluster creation.
- Log on to the Container Service console.
- In the left-side navigation pane, click Clusters to go to the Clusters page.
- Select the target cluster and click Manage in the Actions column.
- In the Cluster Resources section, click the ID of the public SLB instance. You are redirected to the Instance Details page of the SLB instance.
- In the left-side navigation pane, choose Configure Listener in the Actions column.. Find the target SLB instance and click
- Add an SSH listener. Add an SSH listener. For more information, see Add a TCP listener.
- After the listener is created, you can use SSH to connect to your cluster through the public IP of the SLB instance.