APIM EE - MongoDB
gravitee-io/ee/apim/mongodb
Gravitee APIM Enterprise Edition with MongoDB backend
Deploys a full Gravitee API Management Enterprise Edition stack (Console,
Portal, Gateway, and Management API) backed by MongoDB for persistence
and Elasticsearch for analytics. The Kafka Gateway is enabled by default,
allowing the APIM Gateway to act as a Kafka proxy — clients connect using
the Kafka protocol via *.kafka.gck.local:9092 with TLS.
Install gck#
go install github.com/gravitee-io-labs/gck@latest
For other installation methods, see Installation .
This context uses DNS for host-based Kafka routing (*.kafka.gck.local).
After creating the cluster, run the one-time OS setup so these hostnames
resolve on your machine:
gck setup dns
The setup command requires
sudobecause it writes to system directories:/etc/resolver/on macOS, andsystemd-resolvedconfiguration on Linux. Once done, day-to-daygck createandgck deletecommands run without elevated privileges.
See the Networking guide for details.
Usage#
Create#
gck create --from gravitee-io/ee/apim/mongodb
Cleanup#
gck delete
Quick Start#
Sign in to the APIM Console at http://localhost:30080
with the default admin account (admin / admin).
To create your first API, follow the Gravitee APIM quick start guide .
Connecting a Kafka client#
Extract the TLS certificate from the running cluster:
kubectl get secret kafka-tls -n gravitee -o jsonpath='{.data.tls\.crt}' | base64 -d > kafka-tls.crt
Then configure your Kafka client properties:
security.protocol=SSL
ssl.truststore.type=PEM
ssl.truststore.location=/path/to/kafka-tls.crt
ssl.endpoint.identification.algorithm=
The ssl.endpoint.identification.algorithm must be set to empty because the
self-signed certificate covers *.kafka.gck.local but broker metadata
addresses use two-level subdomains (e.g. broker-0-acr.kafka.gck.local)
that don’t match the single-level wildcard.
License#
This is an Enterprise Edition (EE) context. Place your Gravitee license
key at $HOME/opt/gravitee/license.key and gck will automatically mount
it into the cluster. If the file is missing, the license component is
silently skipped (onMissing: ignore).
To use a different path, override it in your gck.yaml:
components:
- name: license
k8s:
secrets:
- name: gravitee-license
fromFile: '/custom/path/to/license.key'
Composition chain
This context is composed from the following base contexts:
Endpoints
Services this context exposes on your machine after gck create, including the ones it inherits from the contexts it composes. Rows marked with a flag only exist when you pass it.
| Service | URL | Notes | From |
|---|---|---|---|
| MongoDB | localhost:30017 | no authentication | mongodb/standalone |
| Elasticsearch | http://localhost:30920 | security disabled | elastic/elasticsearch/standalone |
| APIM Console | http://localhost:30080 | gravitee-io/oss/apim/base | |
| APIM Portal | http://localhost:30081 | gravitee-io/oss/apim/base | |
| APIM Gateway | http://localhost:30082 | gravitee-io/oss/apim/base | |
| APIM Gateway (TLS) | https://localhost:30084 | gravitee-io/oss/apim/base | |
| APIM API | http://localhost:30083 | gravitee-io/oss/apim/base | |
| Kafka Gateway | *.kafka.gck.local:9092 | TLS | gravitee-io/ee/apim/base |
| APIM Bridge API | http://localhost:30085 | needs --enable-bridge | gravitee-io/oss/apim/base |
| Alert Engine | ws://alert-engine:8072 | needs --enable-alert-engine
in-cluster only | gravitee-io/ee/apim/base |
Context flags
Optional flags you can pass to gck create to customize this context:
| Flag | Description |
|---|---|
--disable-es | Disable Elasticsearch and analytics reporters |
--disable-portal | Disable the developer portal UI |
--disable-ui | Disable both Console and Portal UIs |
--enable-bridge | Enable bridge architecture: management API serves as bridge, gateway syncs through it |
--enable-consul | Deploy Consul and configure APIM service discovery |
--enable-distributed-sync | Deploy Redis and enable distributed sync with multiple gateway replicas |
--enable-gko | Deploy the Gravitee Kubernetes Operator (GKO) alongside APIM |
--enable-hc-vault | Deploy HashiCorp Vault and configure it as a secret provider |
--enable-keycloak | Deploy Keycloak and configure APIM OIDC security provider |
--enable-kibana | Deploy Kibana alongside Elasticsearch |
--enable-mailhog | Deploy MailHog and configure APIM email settings |
--enable-opentelemetry-jaeger | Deploy Jaeger and enable OpenTelemetry tracing on the gateway |
--enable-otel-collector | Export gateway OpenTelemetry traces to a composed otel-collector |
--enable-prometheus | Deploy Prometheus and enable APIM metrics |
--enable-redis | Deploy Redis and use it for gateway rate limiting |
--enable-system-proxy | Deploy mitmproxy and configure APIM HTTP client proxy |
--enable-tags | Configure gateway with sharding tags (internal/external) |
--enable-tcp | Add a TCP protocol listener on the gateway |
--enable-tls | Enable TLS termination on the gateway |
--disable-kafka | Disable Kafka Gateway and related components |
--enable-alert-engine | Deploy Alert Engine and wire APIM gateway + management API to send alerts |
Variables
Template variables overridable with --set. Use --set path.segments.var=value to target a specific context in the composition chain.
| Variable | Default | Origin | Description |
|---|---|---|---|
clusterName | gravitee | gravitee-io/ee/apim/base | Name of the Kind cluster |
imageRepository | apache/kafka | kafka/standalone | Apache Kafka Docker image repository |
imageTag | latest | kafka/standalone | Apache Kafka Docker image tag |
imagePrefix | graviteeio | gravitee-io/oss/apim/base | Docker image prefix for all APIM components |
helmVersion | (empty) | gravitee-io/oss/apim/base | Helm chart version constraint |