forked from confluentinc/cp-helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ksql-demo.yaml
42 lines (42 loc) · 1.24 KB
/
ksql-demo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
###
# Example pod with containers for using KSQL on Kubernetes. Not for production.
#
# Before you run:
# - Note the bootstrap servers are `my-confluent-oss-cp-kafka:9092`. You may need to change this with your own connection strings
#
# Run the pod:
# $ kubectl apply -f examples/ksql-demo.yaml
#
# Run KSQL CLI:
# $ kubectl exec -it ksql-demo --container ksql -- /bin/bash ksql
# ksql> list topics ;
# ksql> print 'pageviews';
#
# Then create any query: https://docs.confluent.io/current/ksql/docs/tutorials/basics-docker.html#create-a-stream-and-table
#
###
apiVersion: v1
kind: Pod
metadata:
name: ksql-demo
namespace: default
spec:
containers:
- name: ksql-datagen-pageviews
image: confluentinc/ksqldb-examples:6.0.1
command:
- sh
- -c
- "exec ksql-datagen quickstart=pageviews format=delimited topic=pageviews bootstrap-server=my-confluent-oss-cp-kafka:9092"
- name: ksql-datagen-users
image: confluentinc/ksqldb-examples:6.0.1
command:
- sh
- -c
- "ksql-datagen quickstart=users format=json topic=users iterations=1000 bootstrap-server=my-confluent-oss-cp-kafka:9092"
- name: ksql
image: confluentinc/cp-ksqldb-cli:6.0.1
command:
- sh
- -c
- "exec tail -f /dev/null"