You can refer to the Installation Guide to setup OpenFunction.
Follow this guide to install a Kafka server named kafka-server and a Topic named sample-topic.
Follow this guide to create a registry credential.
To configure the autoscaling demo we will deploy two functions: subscriber which will be used to process messages of the sample-topic queue in Kafka, and the producer, which will be publishing messages.
Follow this guide to deploy a producer.
Modify the spec.image field in function-subscribe.yaml to your own container registry address:
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: autoscaling-subscriber-java
spec:
image: "<your registry name>/autoscaling-subscriber-java:v1"Use the following commands to create these Functions:
kubectl apply -f function-subscriber.yamlBack in the initial terminal now, some 20-30 seconds after the producer starts, you should see the number of subscriber pods being adjusted by Keda based on the number of the sample-topic topic.