LINGJUN clusters support two connection methods: kubectl (for clusters managed by Container Service for Kubernetes) and SSH (for basic LINGJUN services). Choose the method that matches your cluster type.
LINGJUN compute nodes are not reachable from the internet. All cluster operations must be performed from an Elastic Compute Service (ECS) instance in the same Virtual Private Cloud (VPC) as the LINGJUN cluster.
Choose your connection method:
ACK Lingjun managed edition — Connect using kubectl. Jump to this section.
Basic LINGJUN services — Connect using SSH. Jump to this section.
Connect with ACK Lingjun managed edition
Prerequisites
Before you begin, make sure you have:
kubectl installed. See Install Tools in the Kubernetes documentation.
An ECS instance in the same region and zone as the LINGJUN cluster's VPC. See Create an ECS instance.
An internet NAT gateway attached to the VPC, so the ECS instance can reach the internet. See Create and manage an internet NAT gateway instance.
Identify the VPC connected to your LINGJUN cluster
Log on to the Intelligent Computing LINGJUN console.
In the left navigation pane, choose Network Resources > Lingjun Connections.
Click the Cloud Enterprise Network (CEN) name of the corresponding Lingjun connection instance to open the CEN console.
Click the ID or name of the CEN instance.
Click the Resource Topology tab to view the associated VPC. For details, see View resource topology.
Configure cluster credentials
Log on to the Container Service for Kubernetes (ACK) console.
On the Clusters page, click the name of your cluster.
Select a credential type based on your access needs:
Private access credential: Click Copy to copy the credential.
Temporary access credential: Click Generate Temporary Kubeconfig and set a validity period. For details, see Obtain and use a KubeConfig file.

Paste the copied credential into
$HOME/.kube/config. Save and close the file.If the
$HOME/.kube/directory or theconfigfile does not exist, create them before pasting.
Verify connectivity
Run the following command from the ECS instance:
kubectl --kubeconfig .kube/config get nodeIf the connection is successful, the output lists all compute nodes with their names, statuses, and other details:
NAME STATUS ROLES AGE VERSION
<node-name> Ready <none> ... ...Nodes with a Ready status confirm the cluster connection is working.

Connect to basic LINGJUN services
Prerequisites
Before you begin, make sure you have:
An ECS instance in the same region and zone as the LINGJUN cluster's VPC. See Create an ECS instance.
The cluster's logon password. See Cluster and group configurations for details.
Identify the VPC connected to your LINGJUN cluster
Log on to the Intelligent Computing LINGJUN console.
In the left navigation pane, choose Network Resources > Lingjun Connections.
Click the CEN name of the corresponding Lingjun connection instance to open the CEN console.
Click the Resource Topology tab to view the associated VPC. For details, see View resource topology.
Find the node's private IP address
In the Intelligent Computing LINGJUN console, choose Resources and Nodes > Node Management in the left navigation pane.
Click the name of the node you want to connect to.
On the Node Details page, find the private IP address in the Network Information section.
Log on using SSH
From your ECS instance, connect to the node using a shell tool with the following credentials:
| Field | Value |
|---|---|
| Username | root |
| Password | The cluster's logon password |
| Host | The node's private IP address |