> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/platform/deep-dive/deployment-key-concepts/deployment-architecture.md). Agents can also search and read this documentation through its [MCP server](https://docs.digit.org/~gitbook/mcp).

# Deployment Architecture

On this page:

* [Sample Kubernetes architecture](#sample-kubernetes-architecture)
* [DIGIT deployment architecture](#digit-deployment-architecture)
* [CI/CD flow](#ci-cd-flow)
* [Deployment scripts](#deployment-scripts)

## Overview

This section contains architectural details about DIGIT deployment. It discusses the various activities in a sequence of steps to provision required infra and deploy DIGIT.

## Sample Kubernetes Architecture

<div align="left"><figure><img src="https://content.gitbook.com/content/051YseixNq69PlJkCdKt/blobs/4E0r0qO1CypteSWxqhnX/image.png" alt=""><figcaption></figcaption></figure></div>

## DIGIT Deployment Architecture

<figure><img src="https://content.gitbook.com/content/051YseixNq69PlJkCdKt/blobs/YyYV7oarIHtJU7vMJDbl/image.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/051YseixNq69PlJkCdKt/blobs/hDAQWvSI2HXmdJty95VI/image.png" alt=""><figcaption></figcaption></figure>

## CI/CD Flow

* Every code commit is well-reviewed and squash merge to branches through Pull Requests.
* Trigger the CI Pipeline that ensures code quality, vulnerability assessments, and CI tests before building the artefacts.
* Artefact is version controlled based on Semantic versioning based on the nature of the change.
* After successful CI, Jenkins bakes the Docker Images with the versioned artefacts and pushes the baked Docker image to Docker Registry.
* Deployment Pipeline pulls the built Image and pushes it to the corresponding environment.

## Deployment Scripts

* As all the DIGIT services are containerized and deployed on Kubernetes, we need to prepare deployment manifests. The same can be found [here](https://github.com/egovernments/Train-InfraOps).
* DIGIT has built helm charts using the standard helm approach to ease managing the service-specific configs, customisations, switch/toggle, secrets, etc.
* Golang base Deployment script that reads the values from the helm charts template and deploys into the cluster.
* Each env will have one master yaml template that will have the definition of all the services to be deployed, and their dependencies like Config, Env, Secrets, DB Credentials, Persistent Volumes, Manifest, Routing Rules, etc.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/platform/deep-dive/deployment-key-concepts/deployment-architecture.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
