Skip to content

Deployment planning ​

This page is for the platform team that runs CMK for its customers. It lists what you deploy, what CMK depends on, how to lay out the network, and in which order to install. Install the Registry and Install a regional deployment then walk you through the installation step by step.

What you deploy ​

CMK is deployed as one central deployment and one regional deployment per CMK region:

DeploymentServicesHow manyHolds
CentralRegistryOneEvery tenant with its region and status, every system and the tenant it is mapped to, the tenants' identity provider settings
RegionalCMK, CMK UI, Envoy Gateway with ExtAuthZ, Session Manager; the CMK-2-Krypton Bridge when you use KryptonOne per CMK regionThe tenants of this region: their keys, key configurations, groups, approvals, system links, browser sessions and identity provider trust

Every tenant belongs to exactly one CMK region, chosen when the tenant is registered in the Registry. The Registry sends the tenant's jobs to the CMK of that region, and the tenant's users work only with that region's CMK UI and API. Regional deployments share nothing with each other: each has its own databases, task queue, Session Manager and ExtAuthZ.

ServiceDeploymentPurpose
RegistryCentral, onceRegisters tenants and systems. Sends each tenant's jobs (provision, block, unblock, terminate, identity provider) to the CMK of the tenant's region
CMKRegionalThe API server and four background processes, plus database migration jobs. Serves the tenants of its region
Envoy Gateway and ExtAuthZRegionalThe region's only public entry point. Checks every request
Session ManagerRegionalBrowser sign-in with the identity providers of the region's tenants
CMK UIRegionalThe web console, served as static files. It is configured with one API base URL, its region's gateway
CMK-2-Krypton BridgeRegional, when you use KryptonTurns CMK's key tasks into Krypton operations
CheckerOptional, once per clusterReports the health of the services, the cluster and the service mesh, and the versions of the services, for your monitoring

Every service ships as a container image with a Helm chart, published as OCI artifacts in the GitHub Container Registry; Releases lists them. You need Kubernetes 1.23 or later and Helm 3.8 or later.

Connections between the deployments ​

FromToProtocolPurpose
RegistryTenant manager of each regional CMKAMQP, through Orbital; one Registry target per regionTenant jobs, and the tenants' identity provider settings
Regional CMKRegistry gRPC APIgRPCAPI server: list the tenant's systems. Tenant manager: set the tenant's user groups, read its limits, unmap systems at termination. Event reconciler: update system status and L1 key claims. Task worker: read tenant names
Your tenant onboarding toolingRegistry gRPC APIgRPCRegister tenants, apply identity providers, change limits, block, unblock and terminate tenants; see Connect a regional tenant
Your cloud servicesRegistry gRPC APIgRPCRegister their systems and map them to tenants
CMK-2-Krypton Bridge of each regionRegistry gRPC APIgRPCRegister the systems it creates keys for and map them to their tenant

The Registry is the only service that every region reaches. Its gRPC API can create, block and terminate tenants: protect it with mutual TLS or a service mesh across the regions, and allow only the callers above.

Regions ​

Two kinds of region appear in the configuration:

RegionExampleWhere it is set
CMK region: the regional deployment that serves a tenantemea, usThe tenant's region in the Registry, and the Registry's orbital.targets
System region: where a system runseu10, us20The system's region in the Registry, and the eventProcessor.targets of the regional CMK that serves its tenant

A regional CMK sends key and system tasks to every system region listed in its eventProcessor.targets. Plan which system regions each CMK region serves, and configure a target for each of them.

Dependencies ​

DependencyUsed byNotes
PostgreSQLRegistry (central); CMK and Session Manager (each region)Use a separate database per service and region. CMK creates one schema per tenant of its region
Valkey or RedisCMK (task queue) and Session Manager (sessions), in each region
AMQP 1.0 broker, for example RabbitMQ 4Registry, CMK, your regional servicesCarries tenant jobs from the Registry to the CMK of each region, and tasks from CMK to the system regions. Each Registry and CMK target has its own broker URL, so you can use one central broker or one per region. Create one pair of queues per CMK region and per system region before you install: the services do not create them. The services authenticate with client certificates (SASL EXTERNAL)
OpenID Connect identity providersSession Manager, ExtAuthZOne per tenant, usually the customer's own
Keystore, for example AWS KMSCMK, through pluginsThe keystores that CMK provides for tenants, and access to the customers' own keystores for HYOK
Log, metrics and audit collector (OTLP)All servicesOptional, but needed for audit events
Envoy GatewayEach regionThe public entry point, with the external authorization by ExtAuthZ. The installation guide is written for Envoy Gateway 1.9
Service mesh with mutual TLS, for example Linkerd or IstioAll servicesEncrypts and authenticates the gRPC traffic between the services

Network layout ​

In each region, only Envoy Gateway is reachable from outside. It serves the CMK UI, the CMK API (/cmk/v1) and the Session Manager sign-in endpoints (/sm) on one host, or on two hosts under the same parent domain, for example cmk.emea.example.com. Each region has its own hosts; the users of a tenant use the hosts of their tenant's region.

The internal APIs must be reachable only by the services that call them. Restrict them with Kubernetes NetworkPolicies, and run the services in a service mesh with mutual TLS. Only the Registry's gRPC API and the AMQP broker are called across deployments.

EndpointPortDeploymentAllowed callers
ExtAuthZ gRPC9092RegionalEnvoy Gateway of the same region
CMK HTTP8081RegionalEnvoy Gateway of the same region
Session Manager HTTP8080RegionalEnvoy Gateway of the same region
Session Manager gRPC9091RegionalExtAuthZ and CMK of the same region
Registry gRPC9092CentralThe CMK and CMK-2-Krypton Bridge of every region, your tenant onboarding tooling, and your cloud services that register systems
CMK UI HTTP8080RegionalEnvoy Gateway of the same region
Checker HTTP8080RegionalYour monitoring, or Envoy Gateway if you publish /healthz
Status endpoints (probes, metrics)8888 (ExtAuthZ: 8080)BothThe kubelet and your metrics collector
AMQP broker5671Central or regionalRegistry, CMK, your regional services, with mutual TLS

Installation order ​

Install the central deployment first, then each regional deployment:

  1. Central dependencies: the Registry's PostgreSQL database, and the AMQP broker if you run a central one.
  2. Registry, with one Orbital target per CMK region and a validation rule that allows only these regions; see Install the Registry.
  3. For each region:
    1. Regional dependencies: PostgreSQL databases for CMK and Session Manager, Valkey or Redis, a regional broker if you use one, and the collector.
    2. Session Manager. Its migration job prepares its database.
    3. ExtAuthZ and the Envoy Gateway routes and security policy.
    4. CMK, with services.registry pointing to the central Registry and tenantManager.amqp matching the Registry's target for this region. The Helm chart migrates the database before the services start, and migrates data after they started.
    5. CMK UI, with the API base URL of this region's gateway.
    6. System regions: configure one eventProcessor.targets entry per system region that this CMK serves, and set up the broker addresses for the services there; see Connect a regional system.
    7. Checker (optional), to monitor the region's services and the cluster; see Checker.
  4. First tenant: register it in the Registry with the region that should serve it. The CMK of that region creates its schema and default groups. Then apply its identity provider, which that region's Session Manager trusts from then on.

Install a regional deployment covers the regional steps in detail, with the Helm commands and values for each service.

Adding a region ​

  1. Create the new region's queues on the broker. The Registry connects to every target at startup and does not start while one cannot be reached, which affects all regions.
  2. Install a regional deployment as above.
  3. Add a target for the new region to the Registry's orbital.targets, and the region to its Tenant.Region validation rule.
  4. Register new tenants with the new region. An existing tenant stays in the region it was registered with.

Replicas ​

ProcessReplicasChart setting
CMK API serverTwo or more; it can scale with an autoscalerapiServer.replicaCount, apiServer.autoscaling
CMK tenant manager, event reconciler, task workerOne or more<component>.replicaCount; the tenant manager also tenantManager.autoscaling
CMK task schedulerExactly one. Each replica schedules the periodic tasksFixed by the chart
Session ManagerTwo or morereplicaCount, autoscaling
Session Manager housekeeperExactly onehousekeeper.enabled
ExtAuthZTwo or more; every API request passes itreplicaCount, hpa
CMK UITwo or morereplicaCount, hpa
Registry (central)One or morereplicaCount, hpa

Decisions to make first ​

DecisionWhere it is configured
CMK regions: which regional deployments you run, and which region serves which tenantsRegistry orbital.targets and Tenant.Region validation; CMK tenantManager.amqp
The name of each installation, used in certificates, tasks and notificationsCMK landscape.name and landscape.region
System regions served by each CMK regionCMK eventProcessor.targets of that region; Registry RegionalSystem.Region validation
Tenant ID format: use lowercase letters, digits and hyphensYour tenant onboarding process
Which key types each tenant may use (BYOK, HYOK per keystore)CMK feature gates and flags
Keystore accounts for the keystore poolCMK keystorePool, keystore plugins
Default tenant limits (key configurations, keys, systems)CMK tenant, Registry tenant configuration
How customers' groups reach CMK (group claim, IAM identifiers)Identity providers, ExtAuthZ

Before you go live ​

  • Work through the hardening checklist.
  • Set up monitoring and backups; see Operations.
  • Test the full path with a test tenant in each CMK region: register it in the Registry, sign in, create a key configuration, add a key, connect a test system in each system region.

See also ​

EU and German government funding logos

Funded by the European Union – NextGenerationEU.

The views and opinions expressed are solely those of the author(s) and do not necessarily reflect the views of the European Union or the European Commission. Neither the European Union nor the European Commission can be held responsible for them.