diff --git a/deploy/aliyun/README.md b/deploy/aliyun/README.md index 15ce2426f5..172befa88a 100644 --- a/deploy/aliyun/README.md +++ b/deploy/aliyun/README.md @@ -52,6 +52,8 @@ $ terraform apply `terraform apply` will take 5 to 10 minutes to create the whole stack, once complete, basic cluster information will be printed: +> **Note:** You can use the `terraform output` command to get this information again. + ``` Apply complete! Resources: 3 added, 0 changed, 1 destroyed. diff --git a/deploy/aws/README.md b/deploy/aws/README.md index f232fc3284..1d447bcffe 100644 --- a/deploy/aws/README.md +++ b/deploy/aws/README.md @@ -5,7 +5,7 @@ * [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) >= 1.11 * [helm](https://github.com/helm/helm/blob/master/docs/install.md#installing-the-helm-client) >= 2.9.0 * [jq](https://stedolan.github.io/jq/download/) -* [aws-iam-authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator#4-set-up-kubectl-to-use-authentication-tokens-provided-by-aws-iam-authenticator-for-kubernetes) +* [aws-iam-authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator) installed in `PATH` ## Configure awscli @@ -20,26 +20,29 @@ The default setup will create a new VPC and a t2.micro instance as bastion machi * 2 c4.4xlarge instances for TiDB * 1 c5.xlarge instance for monitor +You can change default values in `variables.tf` (like the cluster name and versions) as needed. The default value of `cluster_name` is `my-cluster`. ``` shell -$ git clone https://github.com/pingcap/tidb-operator +$ git clone --depth=1 https://github.com/pingcap/tidb-operator $ cd tidb-operator/deploy/aws $ terraform init $ terraform apply ``` -After `terraform apply` is executed successfully, you can access the `monitor_endpoint` using your web browser. +It might take 10 minutes or more for the process to finish. After `terraform apply` is executed successfully, some basic information is printed to the console. You can access the `monitor_endpoint` using your web browser. + +> **Note:** You can use the `terraform output` command to get that information again. To access TiDB cluster, use the following command to first ssh into the bastion machine, and then connect it via MySQL client: ``` shell -ssh -i credentials/k8s-prod-my-cluster.pem ec2-user@ +ssh -i credentials/k8s-prod-.pem ec2-user@ mysql -h -P -u root ``` If the DNS name is not resolvable, be patient and wait a few minutes. -You can interact with the EKS cluster using `kubectl` and `helm` with the kubeconfig file `credentials/kubeconfig_`. The default `cluster_name` is `my-cluster`, you can change it in the variables.tf. +You can interact with the EKS cluster using `kubectl` and `helm` with the kubeconfig file `credentials/kubeconfig_`. ``` shell # By specifying --kubeconfig argument @@ -52,7 +55,15 @@ kubectl get po -n tidb helm ls ``` -> **NOTE:** You have to manually delete the EBS volumes after running `terraform destroy` if you don't need the data on the volumes any more. +# Destory + +It may take some while to finish destroying the cluster. + +```shell +$ terraform destroy +``` + +> **Note:** You have to manually delete the EBS volumes in AWS console after running `terraform destroy` if you do not need the data on the volumes anymore. ## Upgrade TiDB cluster diff --git a/docs/aws-eks-tutorial.md b/docs/aws-eks-tutorial.md index 9097170ed2..88dae6f4d9 100644 --- a/docs/aws-eks-tutorial.md +++ b/docs/aws-eks-tutorial.md @@ -4,6 +4,8 @@ summary: Tutorial for deploying TiDB on Kubernetes via AWS EKS. category: operations --- +> **Note:** This documentation is outdated and might not work, so it is recommended to see the latest version in the [deploy directory](/deploy/aws/README.md). + # Deploy TiDB, a distributed MySQL compatible database, on Kubernetes via AWS EKS ## Requirements: