GoogleCloudPlatform/bank-of-anthos

Retail banking sample application showcasing Kubernetes and Google Cloud

Java

1,463

2,332 commits

updated Oct 13, 2026

See the code

README

Bank of Anthos

Website

Bank of Anthos is a sample HTTP-based web app that simulates a bank's payment processing network, allowing users to create artificial bank accounts and complete transactions.

Google uses this application to demonstrate how developers can modernize enterprise applications using Google Cloud products, including: Google Kubernetes Engine (GKE), Anthos Service Mesh (ASM), Anthos Config Management (ACM), Migrate to Containers, Spring Cloud GCP, Cloud Operations, Cloud SQL, Cloud Build, and Cloud Deploy. This application works on any Kubernetes cluster.

If you are using Bank of Anthos, please ★Star this repository to show your interest!

Note to Googlers: Please fill out the form at go/bank-of-anthos-form.

Screenshots

Sign inHome
LoginUser Transactions

Service architecture

Architecture Diagram

ServiceLanguageDescription
frontendPythonExposes an HTTP server to serve the website. Contains login page, signup page, and home page.
ledger-writerJavaAccepts and validates incoming transactions before writing them to the ledger.
balance-readerJavaProvides efficient readable cache of user balances, as read from ledger-db.
transaction-historyJavaProvides efficient readable cache of past transactions, as read from ledger-db.
ledger-dbPostgreSQLLedger of all transactions. Option to pre-populate with transactions for demo users.
user-servicePythonManages user accounts and authentication. Signs JWTs used for authentication by other services.
contactsPythonStores list of other accounts associated with a user. Used for drop down in "Send Payment" and "Deposit" forms.
accounts-dbPostgreSQLDatabase for user accounts and associated data. Option to pre-populate with demo users.
loadgeneratorPython/LocustContinuously sends requests imitating users to the frontend. Periodically creates new accounts and simulates transactions between them.

Interactive quickstart (GKE)

The following button opens up an interactive tutorial showing how to deploy Bank of Anthos in GKE:

Open in Cloud Shell

Quickstart (GKE)

  1. Ensure you have the following requirements:

  2. Clone the repository.

    git clone https://github.com/GoogleCloudPlatform/bank-of-anthos
    cd bank-of-anthos/
    
  3. Set the Google Cloud project and region and ensure the Google Kubernetes Engine API is enabled.

    export PROJECT_ID=<PROJECT_ID>
    export REGION=us-central1
    gcloud services enable container.googleapis.com \
      --project=${PROJECT_ID}
    

    Substitute <PROJECT_ID> with the ID of your Google Cloud project.

  4. Create a GKE cluster and get the credentials for it.

    gcloud container clusters create-auto bank-of-anthos \
      --project=${PROJECT_ID} --region=${REGION} \
      --labels dev-tutorial=bank-of-anthos
    

    Creating the cluster may take a few minutes.

  5. Deploy Bank of Anthos to the cluster.

    kubectl apply -f ./extras/jwt/jwt-secret.yaml
    kubectl apply -f ./kubernetes-manifests
    
  6. Wait for the pods to be ready.

    kubectl get pods
    

    After a few minutes, you should see the Pods in a Running state:

    NAME                                  READY   STATUS    RESTARTS   AGE
    accounts-db-6f589464bc-6r7b7          1/1     Running   0          99s
    balancereader-797bf6d7c5-8xvp6        1/1     Running   0          99s
    contacts-769c4fb556-25pg2             1/1     Running   0          98s
    frontend-7c96b54f6b-zkdbz             1/1     Running   0          98s
    ledger-db-5b78474d4f-p6xcb            1/1     Running   0          98s
    ledgerwriter-84bf44b95d-65mqf         1/1     Running   0          97s
    loadgenerator-559667b6ff-4zsvb        1/1     Running   0          97s
    transactionhistory-5569754896-z94cn   1/1     Running   0          97s
    userservice-78dc876bff-pdhtl          1/1     Running   0          96s
    
  7. Access the web frontend in a browser using the frontend's external IP.

    kubectl get service frontend | awk '{print $4}'
    

    Visit http://EXTERNAL_IP in a web browser to access your instance of Bank of Anthos.

  8. Once you are done with it, delete the GKE cluster.

    gcloud container clusters delete bank-of-anthos \
      --project=${PROJECT_ID} --region=${REGION}
    

    Deleting the cluster may take a few minutes.

Additional deployment options

  • Workload Identity: See these instructions.
  • Cloud SQL: See these instructions to replace the in-cluster databases with hosted Google Cloud SQL.
  • Multi Cluster with Cloud SQL: See these instructions to replicate the app across two regions using GKE, Multi Cluster Ingress, and Google Cloud SQL.
  • Istio: See these instructions to configure an IngressGateway.
  • Anthos Service Mesh: ASM requires Workload Identity to be enabled in your GKE cluster. See the workload identity instructions to configure and deploy the app. Then, apply extras/istio/ to your cluster to configure frontend ingress.
  • Java Monolith (VM): We provide a version of this app where the three Java microservices are coupled together into one monolithic service, which you can deploy inside a VM (eg. Google Compute Engine). See the ledgermonolith directory.

Documentation

Demos featuring Bank of Anthos

fsi
gcp
google-cloud
kubernetes
reference-architecture
sample-app
samples

GoogleCloudPlatform/bank-of-anthos

Retail banking sample application showcasing Kubernetes and Google Cloud

Java

1,463

2,332 commits

updated Oct 13, 2026

See the code

README

Bank of Anthos

Website

Bank of Anthos is a sample HTTP-based web app that simulates a bank's payment processing network, allowing users to create artificial bank accounts and complete transactions.

Google uses this application to demonstrate how developers can modernize enterprise applications using Google Cloud products, including: Google Kubernetes Engine (GKE), Anthos Service Mesh (ASM), Anthos Config Management (ACM), Migrate to Containers, Spring Cloud GCP, Cloud Operations, Cloud SQL, Cloud Build, and Cloud Deploy. This application works on any Kubernetes cluster.

If you are using Bank of Anthos, please ★Star this repository to show your interest!

Note to Googlers: Please fill out the form at go/bank-of-anthos-form.

Screenshots

Sign inHome
LoginUser Transactions

Service architecture

Architecture Diagram

ServiceLanguageDescription
frontendPythonExposes an HTTP server to serve the website. Contains login page, signup page, and home page.
ledger-writerJavaAccepts and validates incoming transactions before writing them to the ledger.
balance-readerJavaProvides efficient readable cache of user balances, as read from ledger-db.
transaction-historyJavaProvides efficient readable cache of past transactions, as read from ledger-db.
ledger-dbPostgreSQLLedger of all transactions. Option to pre-populate with transactions for demo users.
user-servicePythonManages user accounts and authentication. Signs JWTs used for authentication by other services.
contactsPythonStores list of other accounts associated with a user. Used for drop down in "Send Payment" and "Deposit" forms.
accounts-dbPostgreSQLDatabase for user accounts and associated data. Option to pre-populate with demo users.
loadgeneratorPython/LocustContinuously sends requests imitating users to the frontend. Periodically creates new accounts and simulates transactions between them.

Interactive quickstart (GKE)

The following button opens up an interactive tutorial showing how to deploy Bank of Anthos in GKE:

Open in Cloud Shell

Quickstart (GKE)

  1. Ensure you have the following requirements:

  2. Clone the repository.

    git clone https://github.com/GoogleCloudPlatform/bank-of-anthos
    cd bank-of-anthos/
    
  3. Set the Google Cloud project and region and ensure the Google Kubernetes Engine API is enabled.

    export PROJECT_ID=<PROJECT_ID>
    export REGION=us-central1
    gcloud services enable container.googleapis.com \
      --project=${PROJECT_ID}
    

    Substitute <PROJECT_ID> with the ID of your Google Cloud project.

  4. Create a GKE cluster and get the credentials for it.

    gcloud container clusters create-auto bank-of-anthos \
      --project=${PROJECT_ID} --region=${REGION} \
      --labels dev-tutorial=bank-of-anthos
    

    Creating the cluster may take a few minutes.

  5. Deploy Bank of Anthos to the cluster.

    kubectl apply -f ./extras/jwt/jwt-secret.yaml
    kubectl apply -f ./kubernetes-manifests
    
  6. Wait for the pods to be ready.

    kubectl get pods
    

    After a few minutes, you should see the Pods in a Running state:

    NAME                                  READY   STATUS    RESTARTS   AGE
    accounts-db-6f589464bc-6r7b7          1/1     Running   0          99s
    balancereader-797bf6d7c5-8xvp6        1/1     Running   0          99s
    contacts-769c4fb556-25pg2             1/1     Running   0          98s
    frontend-7c96b54f6b-zkdbz             1/1     Running   0          98s
    ledger-db-5b78474d4f-p6xcb            1/1     Running   0          98s
    ledgerwriter-84bf44b95d-65mqf         1/1     Running   0          97s
    loadgenerator-559667b6ff-4zsvb        1/1     Running   0          97s
    transactionhistory-5569754896-z94cn   1/1     Running   0          97s
    userservice-78dc876bff-pdhtl          1/1     Running   0          96s
    
  7. Access the web frontend in a browser using the frontend's external IP.

    kubectl get service frontend | awk '{print $4}'
    

    Visit http://EXTERNAL_IP in a web browser to access your instance of Bank of Anthos.

  8. Once you are done with it, delete the GKE cluster.

    gcloud container clusters delete bank-of-anthos \
      --project=${PROJECT_ID} --region=${REGION}
    

    Deleting the cluster may take a few minutes.

Additional deployment options

  • Workload Identity: See these instructions.
  • Cloud SQL: See these instructions to replace the in-cluster databases with hosted Google Cloud SQL.
  • Multi Cluster with Cloud SQL: See these instructions to replicate the app across two regions using GKE, Multi Cluster Ingress, and Google Cloud SQL.
  • Istio: See these instructions to configure an IngressGateway.
  • Anthos Service Mesh: ASM requires Workload Identity to be enabled in your GKE cluster. See the workload identity instructions to configure and deploy the app. Then, apply extras/istio/ to your cluster to configure frontend ingress.
  • Java Monolith (VM): We provide a version of this app where the three Java microservices are coupled together into one monolithic service, which you can deploy inside a VM (eg. Google Compute Engine). See the ledgermonolith directory.

Documentation

Demos featuring Bank of Anthos

fsi
gcp
google-cloud
kubernetes
reference-architecture
sample-app
samples

Project health

Overall

6.7/10

Maintained

10/10

Code review

7/10
OpenSSF Scorecard

Significant stargazers

ハン / Han

488 followers · starred Jun 2025

Alex Ivanov

313 followers · starred Aug 2025

Nir Gazit

142 followers · starred Feb 2023

Chris Henzie

34 followers · starred Sep 2021