This repository contains Terraform configurations to deploy the Tyk Multi-Data Center Bridge (MDCB) setup, including both Control Plane and Data Plane Helm charts. This setup enables a distributed Tyk Gateway architecture supporting global scaling and high availability across multiple data centers.
Before starting, ensure the following tools and configurations are set up on your local machine:
- Terraform: Download and install Terraform for your OS.
- Helm: Install Helm to manage Kubernetes applications.
- Docker Desktop: Ensure Docker Desktop is installed with the Kubernetes feature enabled. This configuration uses Docker Desktop’s Kubernetes cluster as the provider.
- Tyk Dashboard and MDCB Licenses: Obtain the required licenses for Tyk Dashboard and MDCB, you'll need to update them in the values.yaml file located in the control-plane directory.
Clone this repository to your local machine:
git clone https://github.com/mhuaco/Tyk-mdcb-Terraform.git
cd Tyk-mdcb-Terraform
Run the following command to initialize the Terraform workspace. This will download the necessary provider plugins and set up the working directory for Terraform.
terraform init
3. Update the values.yaml file located in the control-plane directory with the Tyk Dashboard and MDCB licenses.
4. Use the following command to deploy MDCB. This command will install both the Control Plane and Data Plane.
terraform apply
After deployment is complete, you can verify the status of both the Control Plane and Data Plane by running:
kubectl get pods -n tyk-cp
kubectl get pods -n tyk-dp
To bring down the deployed Tyk MDCB infrastructure, use the following command:
terraform destroy
Warning: terraform destroy will delete all infrastructure and associated data. Ensure that you back up any important data before proceeding.
You will be prompted to confirm this action. Type yes to proceed.