Skip to content

Instantly share code, notes, and snippets.

@hguerrero
Created December 7, 2021 17:41
Show Gist options
  • Save hguerrero/fe443defc3c5610ab14be3556cea4ca8 to your computer and use it in GitHub Desktop.
Save hguerrero/fe443defc3c5610ab14be3556cea4ca8 to your computer and use it in GitHub Desktop.
Use external Kafka for microks

Running Microcks with Kafka cluster managed by Strimzi

Setup

  1. Start minikube (I'm using mac so driver is hyperkit
minikube start --cpus 4 --memory 8192 --driver hyperkit
  1. Enable ingress addon
minikube addons enable ingress
  1. (Optional) patch ingress to enable TLS passthrough
kubectl patch -n ingress-nginx deployment/ingress-nginx-controller --type='json' \    
-p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--enable-ssl-passthrough"}]'
  1. Create microcks namespace
kubectl create namespace microcks
  1. Install Strimzi in microcks namespace
kubectl apply -f 'https://strimzi.io/install/latest?namespace=microcks' -n microcks
  1. Create the managed Kafka cluster (this is a one node cluster)
kubectl apply -f 'https://gist.githubusercontent.com/hguerrero/a37cb75416750b13ff02f313c547d2fa/raw/7e413cabdb8131d7f56210f5ce0acdafc6ec0065/kafka-ephemeral-single.yaml' -n microcks
  1. Install microcks
kubectl apply -f 'https://strimzi.io/install/latest?namespace=microcks' -n microcks
  1. Create the microcks install CR with external Kafka async feature
curl https://gist.githubusercontent.com/hguerrero/caa84296215d354500a6ade742fec4f0/raw/4b2713352e82333d16f13946b8d31b1f4fedbcf2/minikube-features-external-kafka.yaml -s | sed 's/KUBE_APPS_URL/'$(minikube ip)'.nip.io/g' | kubectl apply -n microcks -f -

Access microcks

Open a browser and go to microcks.${minikube ip}.nip.io, you can use admin/microcks123 to login. Note that if you are using self signed certs, you might need to access and accept the cert for keycloack first. In that case navigate to microcks-keycloak.${minikube ip}.ni.io You can check the ingress created to get the actual ip used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment