Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 3.27 KB

README.md

File metadata and controls

68 lines (46 loc) · 3.27 KB

Kubernetes Examples

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 Catalogue

example showcases
record-encryption kroxylicious providing encryption-at-rest.
multi-tenant kroxylicious providing multi-tenancy - present one kafka cluster as if it were many.
portperbroker_plain kroxylicious+strimzi using plain connections upstream/downstream.
snirouting_tls kroxylicious+strimzi using TLS upstream/downstream connections with SNI based routing.

Prerequisites to run the kubernetes-examples

If you want build your own kroxylicious images you'll additionally need:

Running the kubernetes-examples

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/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:

  1. starts minikube (if necessary)
  2. installs cert manager, vault and strimzi as necessary.
  3. installs a Kafka cluster using Strimzi into minikube
  4. installs kroxylicious into minikube, configured to proxy the cluster

Metrics

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.