## Module 5: Review TiDB Configuration

### Step 1. Review the TidbCluster configuration

+ On the EKS bastion host, review the TidbCluster resource and its full specification:

   ```bash
   kubectl get tidbcluster tidb-demo -n tidb-cluster -o yaml
   ```

   ```output
   apiVersion: pingcap.com/v1alpha1
   kind: TidbCluster
   metadata:
     name: tidb-demo
     namespace: tidb-cluster
   spec:
     version: v8.1.1
     pd:
       replicas: 1
       ...
     tikv:
       replicas: 1
       ...
     tidb:
       replicas: 1
       service:
         type: LoadBalancer
         annotations:
           service.beta.kubernetes.io/aws-load-balancer-scheme: "internal"
   ```

### Step 2. Check TiDB pod configuration

+ List the TiDB pod and view its details:

   ```bash
   kubectl describe pod -n tidb-cluster -l app.kubernetes.io/component=tidb
   ```

   ```output
   Name:         tidb-demo-tidb-0
   Namespace:    tidb-cluster
   ...
   Containers:
     tidb:
       Image: pingcap/tidb:v8.1.1
       ...
   ```

### Step 3. Check TiKV and PD pod configuration

+ View TiKV pod configuration:

   ```bash
   kubectl get pods -n tidb-cluster -l app.kubernetes.io/component=tikv -o wide
   ```

+ View PD pod configuration:

   ```bash
   kubectl get pods -n tidb-cluster -l app.kubernetes.io/component=pd -o wide
   ```

### Step 4. Scale down or delete the TiDB cluster (optional)

+ To delete the TiDB cluster when you are done with the lab:

   ```bash
   kubectl delete tidbcluster tidb-demo -n tidb-cluster
   ```

   ```output
   tidbcluster.pingcap.com "tidb-demo" deleted
   ```

+ Exit the remote Linux

  ```bash
  exit
  ```
