Think before you speak, read before you think.

kubernetes kafka-client

镜像使用 https://hub.docker.com/r/confluentinc/cp-kafka/

kubectl apply -f kafka-client.yaml

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kafka-client
  namespace: app
spec:
  selector:
    matchLabels:
      app: kafka-client
  template:
    metadata:
      labels:
        app: kafka-client
    spec:
      containers:
        - name: kafka-client
          image: confluentinc/cp-kafka
          imagePullPolicy: IfNotPresent
          command: ["sleep"]
          args: ["infinity"]

长时间跑在 front 或者使用

        command:
          - sh
          - -c
          - "exec tail -f /dev/null"

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *