Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apiVersion: v1
kind: Service
metadata:
name: kafka-demo-service-a
labels:
app: kafka-demo-service-a
component: service
spec:
ports:
- name: http
port: 8080
selector:
app: kafka-demo-service-a
component: service
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-demo-service-a
labels:
app: kafka-demo-service-a
component: service
spec:
replicas: {{ .Values.kafkaDemoService.replicaCount }}
strategy:
type: Recreate
selector:
matchLabels:
app: kafka-demo-service-a
component: service
template:
metadata:
labels:
app: kafka-demo-service-a
component: service
spec:
serviceAccountName: {{ .Values.kafkaDemoService.serviceAccountName }}
containers:
- image: {{ .Values.kafkaDemoService.image.image }}
name: kafka-demo-service-a
ports:
- containerPort: {{ .Values.kafkaDemoService.image.ports.containerPort }}
imagePullPolicy: {{ .Values.kafkaDemoService.image.pullPolicy }}
env:
- name: LOG_LEVEL
value: "debug"
- name: TOPIC1
value: "foo-topic"
- name: TOPIC2
value: "bar-topic"
- name: GROUP
value: "consumer-group-A"
- name: MSG_FREQ
value: "10"
---
apiVersion: v1
kind: Service
metadata:
name: kafka-demo-service-b
labels:
app: kafka-demo-service-b
component: service
spec:
ports:
- name: http
port: 8080
selector:
app: kafka-demo-service-b
component: service
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-demo-service-b
labels:
app: kafka-demo-service-b
component: service
spec:
replicas: {{ .Values.kafkaDemoService.replicaCount }}
strategy:
type: Recreate
selector:
matchLabels:
app: kafka-demo-service-b
component: service
template:
metadata:
labels:
app: kafka-demo-service-b
component: service
spec:
serviceAccountName: {{ .Values.kafkaDemoService.serviceAccountName }}
containers:
- image: {{ .Values.kafkaDemoService.image.image }}
name: kafka-demo-service-b
ports:
- containerPort: {{ .Values.kafkaDemoService.image.ports.containerPort }}
imagePullPolicy: {{ .Values.kafkaDemoService.image.pullPolicy }}
env:
- name: LOG_LEVEL
value: "debug"
- name: TOPIC1
value: "bar-topic"
- name: TOPIC2
value: "foo-topic"
- name: GROUP
value: "consumer-group-B"
- name: MSG_FREQ
value: "10"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment