# V4 Deployment Architecture

<figure><img src="https://3034178245-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJZcdob2emEcLMvLyIxqT%2Fuploads%2FBmcgBXIPdU14xzWq80sP%2Fdeployment-architecture-v4.jpg?alt=media&#x26;token=65961164-d52b-4ae3-a8f0-d4366dc6d5d8" alt=""><figcaption><p>Deployment Architecture</p></figcaption></figure>

The V4 architecture consists of a [Rancher](https://docs.openg2p.org/operations/deployment/scaling/base-infrastructure/rancher) (it requires its own dedicated Kubernetes cluster. [Learn more >>](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade#high-availability-kubernetes-install-with-the-helm-cli)) and one (or more clusters) for all application modules and supporting components. Rancher is capable of managing several clusters if required. However, in our case it suffices to have one "OpenG2P cluster" which hosts all environments (sandboxes) under separate namespaces. The RBAC of Kubernetes is used to provide users access to namespaces. Further, the secure access to applications can be controlled by the following means:

1. Multiple Wireguard servers enable separate [access channels](https://docs.openg2p.org/operations/deployment/deployment-guide/private-access-channel).
2. Access control at the application level, where login to dashboards and portals is controlled via authentication and authorisation defined in Keycloak.

The Keycloak inside the Rancher cluster provides **organisation-wide authorisation** and offers single sign-on for all resources.

{% hint style="info" %}
This deployment architecture is referred to as "V4" by the OpenG2P team due to the way it has evolved over the past few years. The V4 deployment architecture is an evolution of MOSIP's [V3 architecture](https://github.com/mosip/k8s-infra). Unlike V3, where separate clusters are created for environments, in V4, all sandboxes and environments reside in the same cluster with finer access controls
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.openg2p.org/operations/deployment/scaling/v4-deployment-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
