Initial Commit
This commit is contained in:
129
cluster/podman/kafka-kube.yml
Normal file
129
cluster/podman/kafka-kube.yml
Normal file
@@ -0,0 +1,129 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: k1
|
||||
|
||||
spec:
|
||||
containers:
|
||||
- name: controller
|
||||
image: apache/kafka:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: controller-env
|
||||
- configMapRef:
|
||||
name: controller-1
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_RAW
|
||||
- name: broker
|
||||
image: apache/kafka:latest
|
||||
ports:
|
||||
- containerPort: 9092
|
||||
hostPort: 19092
|
||||
protocol: TCP
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: broker-env
|
||||
- configMapRef:
|
||||
name: broker-1
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_RAW
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: k2
|
||||
spec:
|
||||
containers:
|
||||
- name: controller
|
||||
image: apache/kafka:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: controller-env
|
||||
- configMapRef:
|
||||
name: controller-2
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_RAW
|
||||
- name: broker
|
||||
image: apache/kafka:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: broker-env
|
||||
- configMapRef:
|
||||
name: broker-2
|
||||
ports:
|
||||
- containerPort: 9092
|
||||
hostPort: 29092
|
||||
protocol: TCP
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_RAW
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: k3
|
||||
spec:
|
||||
containers:
|
||||
- name: controller
|
||||
image: apache/kafka:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: controller-env
|
||||
- configMapRef:
|
||||
name: controller-3
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_RAW
|
||||
- name: broker
|
||||
image: apache/kafka:latest
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: broker-env
|
||||
- configMapRef:
|
||||
name: broker-3
|
||||
ports:
|
||||
- containerPort: 9092
|
||||
hostPort: 39092
|
||||
protocol: TCP
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_RAW
|
||||
---
|
||||
# https://kubernetes.io/docs/concepts/workloads/pods/
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "goflow"
|
||||
spec:
|
||||
containers:
|
||||
- name: collector
|
||||
image: "docker.io/netsampler/goflow2:latest"
|
||||
# args: ['-transport=file', '-transport.file.sep=', '-format=json']
|
||||
args: # ['-transport=kafka', '-transport.file.sep=', '-format=json']
|
||||
- "-transport=kafka"
|
||||
- "-transport.kafka.brokers=k1:9092,k2:9092,k3:9092"
|
||||
- "-format=json"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 500Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 200Mi
|
||||
ports:
|
||||
- containerPort: 2025
|
||||
hostPort: 2025
|
||||
protocol: UDP
|
||||
restartPolicy: Always
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user