Last active
October 20, 2023 17:41
-
-
Save hguerrero/ce5b9d2124af27133afdc1baaef6b2dc to your computer and use it in GitHub Desktop.
Kafka on Developer Sandbox
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
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
annotations: | |
app.openshift.io/connects-to: '[{"apiVersion":"apps/v1","kind":"Deployment","name":"zkless-kafka"}]' | |
app.openshift.io/route-disabled: 'false' | |
name: kafka-ui | |
labels: | |
app: kafka-ui | |
app.kubernetes.io/component: kafka-ui | |
app.kubernetes.io/instance: kafka-ui | |
app.kubernetes.io/name: kafka-ui | |
app.kubernetes.io/part-of: kafka | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: kafka-ui | |
template: | |
metadata: | |
labels: | |
app: kafka-ui | |
deployment: kafka-ui | |
spec: | |
containers: | |
- name: kafka-ui | |
image: 'provectuslabs/kafka-ui' | |
ports: | |
- containerPort: 8080 | |
protocol: TCP | |
env: | |
- name: KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS | |
value: 'zkless-kafka-bootstrap:9092' | |
resources: {} | |
terminationMessagePath: /dev/termination-log | |
terminationMessagePolicy: File | |
imagePullPolicy: Always | |
restartPolicy: Always | |
terminationGracePeriodSeconds: 30 | |
dnsPolicy: ClusterFirst | |
securityContext: {} | |
schedulerName: default-scheduler | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxUnavailable: 25% | |
maxSurge: 25% | |
revisionHistoryLimit: 10 | |
progressDeadlineSeconds: 600 | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: kafka-ui | |
labels: | |
app: kafka-ui | |
app.kubernetes.io/component: kafka-ui | |
app.kubernetes.io/instance: kafka-ui | |
app.kubernetes.io/name: kafka-ui | |
app.openshift.io/runtime-version: latest | |
annotations: | |
app.openshift.io/connects-to: '[{"apiVersion":"apps/v1","kind":"Deployment","name":"zkless-kafka"}]' | |
spec: | |
ports: | |
- name: 8080-tcp | |
protocol: TCP | |
port: 8080 | |
targetPort: 8080 | |
type: ClusterIP | |
selector: | |
app: kafka-ui | |
deployment: kafka-ui | |
--- | |
kind: Route | |
apiVersion: route.openshift.io/v1 | |
metadata: | |
name: kafka-ui | |
labels: | |
app: kafka-ui | |
app.kubernetes.io/component: kafka-ui | |
app.kubernetes.io/instance: kafka-ui | |
app.kubernetes.io/name: kafka-ui | |
app.openshift.io/runtime-version: latest | |
annotations: | |
app.openshift.io/connects-to: '[{"apiVersion":"apps/v1","kind":"Deployment","name":"zkless-kafka"}]' | |
spec: | |
to: | |
kind: Service | |
name: kafka-ui | |
weight: 100 | |
port: | |
targetPort: 8080-tcp | |
tls: | |
termination: edge | |
insecureEdgeTerminationPolicy: Redirect | |
wildcardPolicy: None |
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
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: zkless-kafka | |
labels: | |
app.kubernetes.io/part-of: kafka | |
app.openshift.io/runtime: amq | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: zkless-kafka | |
template: | |
metadata: | |
labels: | |
app: zkless-kafka | |
spec: | |
containers: | |
- resources: | |
limits: | |
cpu: 250m | |
memory: 512Mi | |
terminationMessagePath: /dev/termination-log | |
name: zkless-kafka | |
command: | |
- /bin/sh | |
- '-c' | |
- >- | |
export CLUSTER_ID=$(bin/kafka-storage.sh random-uuid) && | |
bin/kafka-storage.sh format -t $CLUSTER_ID -c | |
config/kraft/server.properties && bin/kafka-server-start.sh | |
config/kraft/server.properties --override | |
advertised.listeners=${KAFKA_ADVERTISED_LISTENERS} | |
env: | |
- name: LOG_DIR | |
value: /tmp/logs | |
- name: KAFKA_ADVERTISED_LISTENERS | |
value: 'PLAINTEXT://zkless-kafka-bootstrap:9092' | |
ports: | |
- containerPort: 9092 | |
protocol: TCP | |
imagePullPolicy: IfNotPresent | |
terminationMessagePolicy: File | |
image: 'registry.redhat.io/amq-streams/kafka-35-rhel8:2.5.0' | |
restartPolicy: Always | |
terminationGracePeriodSeconds: 30 | |
dnsPolicy: ClusterFirst | |
securityContext: {} | |
schedulerName: default-scheduler | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxUnavailable: 25% | |
maxSurge: 25% | |
revisionHistoryLimit: 10 | |
progressDeadlineSeconds: 600 | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: zkless-kafka-bootstrap | |
spec: | |
ports: | |
- protocol: TCP | |
port: 9092 | |
targetPort: 9092 | |
type: ClusterIP | |
selector: | |
app: zkless-kafka |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment