This directory contains a number of example that demonstrate different features of Kroxylicious in a Kubernetes environment.
The instructions for running the examples are given below.
example | showcases |
---|---|
record-encryption | kroxylicious providing encryption-at-rest. |
multi-tenant | kroxylicious providing multi-tenancy - present one kafka cluster as if it were many. |
example | showcases |
---|---|
portperbroker_plain | kroxylicious+strimzi using plain connections upstream/downstream. |
rangeawareportperbroker_plain | kroxylicious+strimzi with node pools |
snirouting_tls | kroxylicious+strimzi using TLS upstream/downstream connections with SNI based routing. |
If you want build your own kroxylicious images you'll additionally need:
- Docker engine or podman
- Access to a container registry such as quay.io or docker.io with a public accessible repository within the registry named
kroxylicious
.
Kroxylicious can be containerised and run on Minikube against a Strimzi managed Kafka cluster.
To run using pre-built Kroxylcious images:
./scripts/run-example.sh ${kubernetes_example_directory}
where ${kubernetes_example_directory}
is replaced by a path to an example directory e.g. ./kubernetes-examples/network-topologies/portperbroker_plain
.
To use an alternative image for Kroxylicious, set the KROXYLICIOUS_IMAGE
environment variable.
KROXYLICIOUS_IMAGE=quay.io/kroxylicious/kroxylicious:x.y.z ./scripts/run-example.sh ${kubernetes_example_directory}
This run-example.sh
script does the following:
- starts minikube (if necessary)
- installs cert manager, vault and strimzi as necessary.
- installs a Kafka cluster using Strimzi into minikube
- installs kroxylicious into minikube, configured to proxy the cluster
All the examples configure Kroxylicious to emit metrics on the default port 9190
, however
there is nothing configured to scrape them.
You can make an adhoc observation of the metric like this:
kubectl run --restart=Never --attach=true --rm=true -n kroxylicious metrics --image=busybox -- wget -O - http://$(kubectl get pods -n kroxylicious -l app=kroxylicious -o jsonpath="{.items[0].status.podIP}"):9190/metrics
For anything above an adhoc observation, use Prometheus to consume the metrics and something like Grafana to visualise them.