Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/microservices-patterns/ftgo-application/llms.txt

Use this file to discover all available pages before exploring further.

This page describes how to deploy the FTGO application to a Kubernetes cluster. It covers the location of the Kubernetes manifests, how to deploy and undeploy all services using the provided scripts, how to clean up persistent volumes, and the available Skaffold configuration for iterative development.

Prerequisites

Before deploying, make sure you have:
  • kubectl installed and configured to point to your target cluster
  • A running Kubernetes cluster — local (e.g., Minikube, Docker Desktop Kubernetes) or remote
  • Sufficient cluster resources to run stateful services (MySQL, Kafka, Zookeeper, DynamoDB Local) alongside all application services

Manifest locations

Kubernetes YAML manifests are organized in two locations within the repository:
  • deployment/kubernetes/ — infrastructure and stateful services, organized into subdirectories:
    • deployment/kubernetes/stateful-services/ — MySQL, Kafka, Zookeeper, DynamoDB Local, and the database secret
    • deployment/kubernetes/cdc-service/ — the Eventuate CDC service
    • deployment/kubernetes/scripts/ — helper shell scripts
  • */src/deployment/kubernetes/ — each application service’s own Kubernetes manifest (one per service module, e.g., ftgo-consumer-service/src/deployment/kubernetes/ftgo-consumer-service.yml)
The application services with manifests under */src/deployment/kubernetes/ are:
  • ftgo-accounting-service
  • ftgo-api-gateway
  • ftgo-consumer-service
  • ftgo-kitchen-service
  • ftgo-order-history-service
  • ftgo-order-service
  • ftgo-restaurant-service

Deploying the application

1

Deploy all services

Run the deploy script from the repository root. This applies the stateful service manifests first, waits for those pods to become ready, then applies the CDC service and all application service manifests:
./deployment/kubernetes/scripts/kubernetes-deploy-all.sh
The script waits for ftgo-mysql-0, ftgo-kafka-0, ftgo-dynamodb-local-0, and ftgo-zookeeper-0 to be ready before proceeding with the CDC and application services.
2

Verify pods are running

Check that all pods have started successfully:
kubectl get pods
All pods should reach Running status. Stateful services (Kafka, Zookeeper, MySQL, DynamoDB Local) are deployed as StatefulSets and may take a minute to initialize.
3

Access services via port forwarding

The repository provides a port-forwarding script that forwards local ports to the running pods:
./deployment/kubernetes/scripts/port-forwards.sh
This sets up the following local port mappings:
ServiceLocal port
ftgo-consumer-service8081
ftgo-order-service8082
ftgo-kitchen-service8083
ftgo-restaurant-service8084
ftgo-accounting-service8085
ftgo-api-gateway8087
To stop all active port-forwards:
./deployment/kubernetes/scripts/kubernetes-kill-port-forwarding.sh

Undeploying the application

To delete all deployed resources (services, deployments, StatefulSets, and configmaps):
./deployment/kubernetes/scripts/kubernetes-delete-all.sh
This deletes all resources defined in */src/deployment/kubernetes/*.yml and deployment/kubernetes/*/*.yml.

Deleting persistent volumes

The kubernetes-delete-all.sh script does not remove persistent volume claims (PVCs). Stateful services — Kafka, Zookeeper, MySQL, and DynamoDB Local — each use a PVC to retain data across pod restarts. To delete all four PVCs:
./deployment/kubernetes/scripts/kubernetes-delete-volumes.sh
Deleting persistent volume claims permanently removes stored data for MySQL, Kafka, Zookeeper, and DynamoDB Local. Only run this command if you want a clean slate.

Skaffold support

The repository includes a skaffold.yaml configuration at the root, which enables Skaffold-based development workflows. The configuration builds the msapatterns/ftgo-consumer-service image and deploys the full manifest set — stateful services, CDC service, and the consumer service — using kubectl apply. To use Skaffold for continuous development:
skaffold dev
The skaffold.yaml currently includes only ftgo-consumer-service in its build artifacts. To build and deploy other services with Skaffold, add their image definitions to the build.artifacts section of skaffold.yaml.

Stateful services

The following services use Kubernetes StatefulSets with persistent volume claims and must be running before application services start:
ServiceStatefulSetManifest
MySQLftgo-mysqlstateful-services/ftgo-mysql-deployment.yml
Apache Kafkaftgo-kafkastateful-services/ftgo-kafka-deployment.yml
Zookeeperftgo-zookeeperstateful-services/ftgo-zookeeper-deployment.yml
DynamoDB Localftgo-dynamodb-localstateful-services/ftgo-dynamodb-local.yml
Database credentials are stored in a Kubernetes Secret defined in stateful-services/ftgo-db-secret.yml. The deploy script applies this secret as part of the stateful services step.

Build docs developers (and LLMs) love