AWS EKS with Fargate

This guide shows how to deploy UI Bakery on AWS EKS using Fargate. It is assumed that you have an active AWS account and have copied the repository containing the necessary configuration files for the deployment process.

  1. Create cluster with eksctl:

    • Install eksctl if it's not already installed.

    • Run eksctl create cluster -f ./templates/eksctl-fargate.yaml. If necessary, you can modify the region and cluster name specified in the file to match your desired configurations.

    • Once the command execution is finished, you will have successfully created your AWS EKS cluster.

  2. Set up the MySQL database required for UI Bakery on AWS RDS.

    • Create a new RDS instance in your AWS account. It should have MySQL 8+ engine and be accessible by the cluster. Configure the remaining database settings according to your requirements.

    • Create database and user with the following permissions: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE

    • Put database credentials in ./kubernetes/ui-bakery-configmap or in secrets for

      bakery-back service:

    UI_BAKERY_DB_HOST: bakery.xxx.us-east-1.rds.amazonaws.com
    UI_BAKERY_DB_PORT: 3306
    UI_BAKERY_DB_DATABASE: bakery
    UI_BAKERY_DB_USERNAME: bakery
    UI_BAKERY_DB_PASSWORD: bakery
    • Delete the default db configuration file ./kubernetes/ui-bakery-database.yaml

  3. Configure the Elastic Load Balancer (ELB) for your UI Bakery deployment

    • Verify that all the cluster subnets have the required tags:

      • Each subnet should have the tag kubernetes.io/cluster/ui-bakery=shared.

      • Private subnets should have the tag kubernetes.io/role/internal-elb=1.

      • Public subnets should have the tag kubernetes.io/role/elb=1.

    • Add annotations for bakery-gateway service in ./kubernetes/ui-bakery-gateway file:

      annotations:
        service.beta.kubernetes.io/aws-load-balancer-type: "external"
        service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"
        service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
  4. Deploy UI Bakery with the following command kubectl apply -f ./kubernetes

Last updated

© 2024 UI Bakery