> For the complete documentation index, see [llms.txt](https://tech.x2bee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.x2bee.com/dev-guide/developer-guide-en/pjt-prepare/architecture-guide/service-kubernetes-configuration-design.md).

# Service (Kubernetes) Configuration Design

### Application Service

<figure><img src="https://200425-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVEZx3rsZsIv89GPS3d2J%2Fuploads%2FvmKtPXW8JxcZzgAngxnf%2FKubernetes%20%E1%84%80%E1%85%AE%E1%84%89%E1%85%A5%E1%86%BC%20%E1%84%89%E1%85%A5%E1%86%AF%E1%84%80%E1%85%A8_Application%20Service.png?alt=media&#x26;token=db336bea-a276-4eb2-b284-d290da9cb479" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="268.4444580078125"></th><th></th></tr></thead><tbody><tr><td><strong>Resource Configuration</strong></td><td><strong>Information</strong></td></tr><tr><td><strong>Client / BFF / GW – BO, CC</strong></td><td><ul><li>BO and CC target the client (PC browser + JavaScript), and the application is built with Next.js, which supports Server Side Rendering (SSR).</li></ul></td></tr><tr><td><strong>Client / BFF / GW – FO (PC, MO)</strong></td><td><ul><li>The FO (PC, MO) Client is developed with Next.js and receives RESTful API services from the FO Gateway.</li><li>The diagram above represents the logical configuration; in practice, SSR is performed using Node.js.</li></ul></td></tr><tr><td><strong>APIs</strong></td><td><ul><li>RESTful API services implemented with Spring Boot</li><li>Composed of the order, member, common, goods, display, event, and bo API services.</li></ul></td></tr><tr><td><strong>DBMS</strong></td><td><ul><li>Member/Order {order, member, common}</li><li>Product/Display {goods, display}</li><li>Event {event}</li><li>Redundant Master (Read-Write) / Replica (Read Only) structure</li><li>Table synchronization using ETL or batch jobs</li></ul></td></tr></tbody></table>

### Log Stack

<figure><img src="https://200425-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVEZx3rsZsIv89GPS3d2J%2Fuploads%2FpcFcScU8HJWb4jxPLSMz%2FLog%20Stack_2.drawio.png?alt=media&#x26;token=49ee5712-7d35-4e3a-8e79-515cf05df74b" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="145.111083984375"></th><th></th></tr></thead><tbody><tr><td><strong>Resource Configuration</strong></td><td><strong>Information</strong></td></tr><tr><td><strong>OpenSearch</strong></td><td><ul><li>Indexes and stores collected application logs</li></ul></td></tr><tr><td><strong>Fluentd</strong></td><td><ul><li>Collects and formats application logs and sends them to OpenSearch</li></ul></td></tr><tr><td><strong>Kibana</strong></td><td><ul><li>Provides a UI for developers to view logs in OpenSearch</li></ul></td></tr><tr><td><strong>EFK Server Location</strong></td><td><ul><li>fluentd: Kubernetes</li><li>OpenSearch: AWS (Managed Service)</li><li>Kibana: AWS (Managed Service)</li></ul></td></tr><tr><td><strong>Log Retention</strong></td><td><ul><li>Separately from OpenSearch, logs are compressed and archived in S3 according to the retention period</li></ul></td></tr></tbody></table>

### Telemetry

<figure><img src="https://200425-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVEZx3rsZsIv89GPS3d2J%2Fuploads%2FkmikxsX81q0MdlsauML1%2Fkubernetes_Telemetry.png?alt=media&#x26;token=99965815-30f9-4c1c-bc86-6b2d9a4a2c29" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="194.0001220703125"></th><th></th></tr></thead><tbody><tr><td><strong>Resource Configuration</strong></td><td><strong>Information</strong></td></tr><tr><td><strong>APM</strong></td><td><ul><li>Application performance management. Identifies and improves bottlenecks in request processing performance</li><li>An APM-provided library is configured together with the application<br>(* Product to be used is undecided)</li></ul></td></tr><tr><td><strong>Prometheous-Grafana</strong></td><td><ul><li>Monitors Pod metrics (CPU, memory, network utilization, etc.)</li><li>Provided by Istio Envoy</li></ul></td></tr><tr><td><strong>Kiali</strong></td><td><ul><li>Monitors the throughput, response time, and health status of calls between MSAs as traffic flow</li><li>Provided by Istio Envoy</li></ul></td></tr><tr><td><strong>Jaeger</strong></td><td><ul><li>Provides functionality to analyze in detail the calls and processing relationships between MSAs for handling a single request</li><li>Provided by Istio Envoy</li></ul></td></tr></tbody></table>

### Software Configuration

<figure><img src="https://200425-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVEZx3rsZsIv89GPS3d2J%2Fuploads%2FmMOABd6zhX6eBdZmkMbc%2Fsoftware%20%E1%84%80%E1%85%AE%E1%84%89%E1%85%A5%E1%86%BC-2.drawio.png?alt=media&#x26;token=3334c4b4-a094-4c7c-a927-a0f9843b802c" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="178.4444580078125"></th><th></th></tr></thead><tbody><tr><td><strong>Resource Configuration</strong></td><td><strong>Information</strong></td></tr><tr><td><strong>Application</strong></td><td>Springboot</td></tr><tr><td><strong>Container</strong></td><td>Docker</td></tr><tr><td><strong>Orchestration</strong></td><td>EKS(Kubernetes)</td></tr><tr><td><strong>Servismesh</strong></td><td>istio</td></tr><tr><td><strong>CICD</strong></td><td>Gitlab, Nexus, Jenkins, Sonarqube, Helm Chart, ArgoCD</td></tr><tr><td><strong>Logging</strong></td><td>EFK (OpenSearch, Fluentd, Kibana)</td></tr><tr><td><strong>Telemetry</strong></td><td>EKS</td></tr><tr><td><strong>Batch Scheduler</strong></td><td>Cronicle</td></tr><tr><td><strong>APM</strong></td><td>WhaTap or Scouter</td></tr><tr><td><strong>DBMS</strong></td><td>PostgreSQL</td></tr><tr><td><strong>In-Memory</strong></td><td>Redis(Session Clustering)</td></tr></tbody></table>

### Software List

| **Application Area**     | **Applied Solution** | **License**            | **Version / Other**                  |
| ------------------------ | -------------------- | ---------------------- | ------------------------------------ |
| **External Proxy (ALB)** | AWS ALB              | AWS PaaS               | Managed Service                      |
| **Servie Mesh (G/W)**    | Istio                | Apache License 2.0     | Version 1.8 or higher                |
| **Orchastration**        | Kubernetes           | Apache License 2.0     | Version 1.19 or higher               |
| **Data Storage**         | S3(AWS)              | AWS PaaS               | Managed Service                      |
| **CI/CD**                | Gitlab               | MIT License            | Source Integration                   |
|                          | Jenkins              | MIT License            | CI/CD Pipeline                       |
|                          | ArogCD               | Apache License 2.0     | Kubernetes Deployment                |
|                          | Helm                 | Apache License 2.0     | Kubernetes Deployment                |
|                          | NexusOSS             | Eclipse Public License | Library, Docker Image Repository     |
| **Logging**              | Fluentd              | Apache License 2.0     | Application Log Collection           |
|                          | OpenSearch           | AWS PaaS               | Managed Service, Log Index           |
|                          | Kibana               | AWS PaaS               | Managed Service, Log Analysis Screen |
| **Telemetry**            | Prometheus           | Apache License 2.0     | Server Metric Collection             |
|                          | Grafana              | Apache License 2.0     | Provides Server Metric UI            |
|                          | Kiali                | Apache License 2.0     | API Call Monitoring                  |
|                          | Jaeger(Zipkin)       | Apache License 2.0     | Detailed API Call Analysis           |
|                          | WhaTap (TBD)         | Paid License           | TP Monitor (TBD)                     |
| **DBMS**                 | PostgreSQL           | OSI License            | Persistence DBMS                     |
| **In-Memory DB**         | Redis                | AWS PaaS               | Managed Service, Session Clustering  |

### Kubernetes Apps

<figure><img src="https://200425-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVEZx3rsZsIv89GPS3d2J%2Fuploads%2FMHJF0YakLbA8Hz2MJ6q3%2FKubernetes%20Apps-2.drawio.png?alt=media&#x26;token=d7ea93dc-a779-456d-9a38-ea0e75ea77f4" alt=""><figcaption></figcaption></figure>

| **Deployment / Pod**           | **Namespace**                | **Workload** | **Node Label** | **Description**                                           |
| ------------------------------ | ---------------------------- | ------------ | -------------- | --------------------------------------------------------- |
| **x2bee-fo**                   | \[Customer Abbreviation]-app | deployment   | msa            | Node.js Service for PC Web(Next.js Server Side Rendering) |
| **x2bee-gw**                   | \[Customer Abbreviation]-app | deployment   | msa            | RestAPIs Service for Vue.js (Spring Cloud Gateway)        |
| **x2bee-bo**                   | \[Customer Abbreviation]-app | deployment   | msa            | Back Office Web Service (Spring Boot, Next.js)            |
| **x2bee-cc**                   | \[Customer Abbreviation]-app | deployment   | msa            | Customer Center Web Service (Spring Boot, Next.js)        |
| **x2bee-batch-mbod**           | \[Customer Abbreviation]-app | deployment   | msa            | Batch service for member, order (Spring Batch)            |
| **x2bee-batch-gddp**           | \[Customer Abbreviation]-app | deployment   | msa            | Batch service for goods, display (Spring Batch)           |
| **x2bee-api-member**           | \[Customer Abbreviation]-app | deployment   | msa            | Member api service (Springboot, RestApis)                 |
| **x2bee-api-order**            | \[Customer Abbreviation]-app | deployment   | msa            | Order api service (Springboot, RestApis)                  |
| **x2bee-api-goods**            | \[Customer Abbreviation]-app | deployment   | msa            | Goods api service (Springboot, RestApis)                  |
| **x2bee-api-display**          | \[Customer Abbreviation]-app | deployment   | msa            | Display api service (Springboot, RestApis)                |
| **x2bee-api-event**            | \[Customer Abbreviation]-app | deployment   | msa            | Event api service (Springboot, RestApis)                  |
| **x2bee-api-common**           | \[Customer Abbreviation]-app | deployment   | msa            | Common api service (Springboot, RestApis)                 |
| **x2bee-api-bo**               | \[Customer Abbreviation]-app | deployment   | msa            | Bo api service (Springboot, RestApis)                     |
| **istio-ingressgateway**       | istio-system                 | deployment   | msa            | Istio ingress component                                   |
| **istio-tracing**              | istio-system                 | deployment   | msa            | istio tracing component                                   |
| **x2bee-batch-scheduler-mbod** | \[Customer Abbreviation]-app | deployment   | msa            | Batch scheduler for batch-mbod (node.js)                  |
| **x2bee-batch-scheduler-gddp** | \[Customer Abbreviation]-app | deployment   | msa            | Batch scheduler for batch-gddp (node.js)                  |
| **grafana**                    | monitoring                   | deployment   | msa            | monitoring bi                                             |
| **prometheus**                 | monitoring                   | deployment   | msa            | to gather pod metrics                                     |
| **kiali**                      | istio-system                 | deployment   | msa            | to monitor msa calls flows                                |
| **jaeger**                     | istio-system                 | deployment   | msa            | to trace each msa call chain                              |
