Created
April 2, 2020 16:25
-
-
Save tomncooper/4972d9aa83beb8f6db2ef025e03324fd to your computer and use it in GitHub Desktop.
Basic deployment file and CLI script for running ksqlDB in a Kubernetes cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
kubectl -n ksqldb run ksqldb-cli-$1 -ti \ | |
--image=confluentinc/ksqldb-cli:0.8.1 \ | |
--rm=true --restart=Never \ | |
-- /usr/bin/ksql http://ksqldb-server:8088 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: ksqldb-deployment | |
labels: | |
app: ksqldb | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: ksqldb | |
template: | |
metadata: | |
labels: | |
app: ksqldb | |
spec: | |
containers: | |
- name: ksqldb | |
image: confluentinc/ksqldb-server:0.8.1 | |
ports: | |
- containerPort: 8088 | |
env: | |
- name: KSQL_BOOTSTRAP_SERVERS | |
value: PLAINTEXT://my-cluster-kafka-bootstrap:9092 | |
- name: KSQL_LISTENERS | |
value: http://0.0.0.0:8088 | |
- name: KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE | |
value: "true" | |
- name: KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE | |
value: "true" | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: ksqldb-server | |
spec: | |
selector: | |
app: ksqldb | |
ports: | |
- protocol: TCP | |
port: 8088 | |
targetPort: 8088 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment