## Module 1: Connect To Amazon EKS And Familiarize Yourself With The Lab Environment

### Step 1. Connect to the remote Linux machine

+ Click [Terminal 1](ssh://monitor1-ssh#1) to open a new terminal connected to the virtual machine assigned for your hands-on lab.

    ```output
    Welcome to Ubuntu 22.04.x LTS (GNU/Linux 5.15.x-x86_64)
    ...
    ubuntu@ip-10-90-x-x:~$
    ```

### Step 2. Get the lab resources information

+ Stay in `ubuntu` home directory, check the contents of the `hosts-env.sh` file for IP addresses information. Your output might be different as the `sample_output`:

   ```bash
   cat hosts-env.sh
   ```

   ```output
   export HOST_MONITOR1_PRIVATE_IP=10.90.4.19
   export HOST_MONITOR1_PUBLIC_IP=44.234.33.106
   export HOST_CM_PRIVATE_IP=10.90.4.19
   export HOST_CM_PUBLIC_IP=44.234.33.106
   export EKS_CLUSTER_NAME=tidb-demo-eks
   export TIDB_HOST=internal-xxxxx.elb.region.amazonaws.com
   export TIDB_PORT=4000
   ```

+ Set the node IP address variables on the Linux you connected to.

   ```bash
   source ./hosts-env.sh
   ```

+ You can also click the <kbd>Resources</kbd> tab at the top of this lab guide at any time to access all the lab resource information.

### Step 3. Verify kubectl and Amazon EKS access

+ Enter the following command at the terminal prompt to verify that `kubectl` is available and configured for the Amazon EKS cluster:

   ```bash
   kubectl version --client
   export KUBECONFIG=~/.kube/config
   kubectl get nodes
   ```

   ```output
   NAME                                          STATUS   ROLES    AGE   VERSION
   ip-10-90-1-xxx.us-west-2.compute.internal     Ready    <none>   10m   v1.28.x
   ip-10-90-2-xxx.us-west-2.compute.internal     Ready    <none>   10m   v1.28.x
   ```

+ The bastion host is pre-configured with `kubectl` and `aws eks update-kubeconfig` to access the EKS cluster. TiDB runs as pods on the EKS worker nodes.

### Step 4. Verify Helm is installed

+ Enter the following command at the terminal prompt to verify Helm is available:

   ```bash
   helm version
   ```

   ```output
   version.BuildInfo{Version:"v3.x.x", ...}
   ```

+ Helm is used to install TiDB Operator, which manages TiDB clusters on Kubernetes. Now, the environment is ready for deploying a TiDB cluster on Amazon EKS. Please proceed to the next practice.
