Skip to content

Kubernetes Architecture

Sam edited this page Jun 5, 2023 · 7 revisions

The kubernetes folder contains the configurations yaml files for launching a kubernetes cluster on Google GKE

automated_warehouse_gke drawio (1)

There are two deployment scripts, the first creating the actual warehouse simulator, and the 2nd for the web server. They could be combined into one deployment.

After running all the Kubernetes configuration files in the repository, the following resources will be created:

Pods:

  1. automated-warehouse: Contains the redis-db, world-sim, order-processor, and robot-allocator containers.
  2. automated-warehouse-web: Contains the web-node container.

Containers:

  1. redis-db: Runs a Redis server.
  2. world-sim: Runs the world simulation.
  3. order-processor: Runs the order processor.
  4. robot-allocator: Runs the robot allocator.
  5. web-node: Runs a Node.js application for the web UI.

Services:

  1. redis-service: Exposes the Redis server on port 6379.
  2. web-node-service: Exposes the Node.js application on port 3000.
graph LR

    subgraph Pod: automated-warehouse
    redis_db[Container: redis-db]
        world_sim[Container: world-sim]
        order_processor[Container: order-processor]
        robot_allocator[Container: robot-allocator]
    end
    subgraph Pod: automated-warehouse-web
        web_node[Container: web-node]
    end

    subgraph Services
        redis_service[Service: redis-service]
        web_node_service[Service: web-node-service]
    end
    
    world_sim -->|writes state data| redis_db
    redis_db -.->|provides robot plans| world_sim
    redis_db -.->|provides orders| order_processor
    redis_db -.->|provides tasks| robot_allocator
    redis_db -.->|provides state data| web_node
    order_processor -->|writes processed orders| redis_db
    robot_allocator -->|writes robot plans| redis_db

    redis_db -->|exposes| redis_service
    web_node -->|exposes| web_node_service
Loading

Deployments

  1. automated-warehouse-deploy-and-services.yaml

    • Redis DB container (redis-db): This container runs a Redis server.
    • World Sim container (world-sim): This container runs the world simulation.
    • Order Processor container (order-processor): This container runs the order processor.
    • Robot Allocator container (robot-allocator): This container runs the robot allocator.
  2. automated-warehouse-web-deploy-and-services.yaml

    • Node web UI container (web-node): This container runs a Node.js application for the web user interface.
Kubernetes Configuration File Container Name Description
automated-warehouse-deploy-and-services.yaml redis-db Runs a Redis server
automated-warehouse-deploy-and-services.yaml world-sim Runs the world simulation
automated-warehouse-deploy-and-services.yaml order-processor Runs the order processor
automated-warehouse-deploy-and-services.yaml robot-allocator Runs the robot allocator
automated-warehouse-web-deploy-and-services.yaml web-node Runs a Node.js application for the web UI

At the moment, only 1 container is spun up for each. Technically, multiple node web servers could be spun up to handle larger user loads.

Services

  1. automated-warehouse-deploy-and-services.yaml

    • Redis Service (redis-service): This service exposes the Redis server running in the redis-db container on port 6379.
  2. automated-warehouse-web-deploy-and-services.yaml

    • Web Node Service (web-node-service): This service exposes the Node.js application running in the web-node container on port 3000.
Kubernetes Configuration File Service Name Description Port
automated-warehouse-deploy-and-services.yaml redis-service Exposes the Redis server 6379
automated-warehouse-web-deploy-and-services.yaml web-node-service Exposes the Node.js application for the web UI 3000
Clone this wiki locally