github.com/looshlee/cilium@v1.6.12/examples/kubernetes-kafka/kafka-sw-app.yaml (about)

     1  ---
     2  apiVersion: apps/v1
     3  kind: Deployment
     4  metadata:
     5    name: kafka-broker
     6  spec:
     7    selector:
     8      matchLabels:
     9        app: kafka
    10    replicas: 1
    11    template:
    12      metadata:
    13        labels:
    14          app: kafka
    15      spec:
    16        containers:
    17        - name: kafka
    18          image: docker.io/wurstmeister/kafka:1.1.0
    19          ports:
    20          - containerPort: 9092
    21          env:
    22          - name: KAFKA_ADVERTISED_HOST_NAME
    23            value: kafka-service
    24          - name: KAFKA_ZOOKEEPER_CONNECT
    25            value: zook:2181
    26          - name: KAFKA_BROKER_ID
    27            value: "1"
    28          - name: KAFKA_CREATE_TOPICS
    29            value: "empire-announce:1:1,deathstar-plans:1:1"
    30          - name: KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS
    31            value: "60000"
    32          - name: KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS
    33            value: "60000"
    34  ---
    35  apiVersion: apps/v1
    36  kind: Deployment
    37  metadata:
    38    name: zookeeper
    39  spec:
    40    selector:
    41      matchLabels:
    42        app: zook
    43    replicas: 1
    44    template:
    45      metadata:
    46        labels:
    47          app: zook
    48      spec:
    49        containers:
    50        - name: zookeeper
    51          image: docker.io/digitalwonderland/zookeeper
    52          ports:
    53          - containerPort: 2181
    54  ---
    55  apiVersion: v1
    56  kind: Service
    57  metadata:
    58    name: zook
    59    labels:
    60      app: zook
    61  spec:
    62    ports:
    63    - port: 2181
    64      name: zookeeper-port
    65      targetPort: 2181
    66      protocol: TCP
    67    selector:
    68      app: zook
    69  ---
    70  apiVersion: v1
    71  kind: Service
    72  metadata:
    73    name: kafka-service
    74    labels:
    75      app: kafka
    76  spec:
    77    ports:
    78    - port: 9092
    79      name: kafka-port
    80      targetPort: 9092
    81      protocol: TCP
    82    selector:
    83      app: kafka
    84    clusterIP: None
    85  ---
    86  apiVersion: apps/v1
    87  kind: Deployment
    88  metadata:
    89    name: empire-hq
    90  spec:
    91    selector:
    92      matchLabels:
    93        app: empire-hq
    94    replicas: 1
    95    template:
    96      metadata:
    97        labels:
    98          app: empire-hq
    99      spec:
   100        containers:
   101        - name: empire-hq
   102          image: docker.io/cilium/kafkaclient
   103  ---
   104  apiVersion: apps/v1
   105  kind: Deployment
   106  metadata:
   107    name: empire-outpost-8888
   108  spec:
   109    selector:
   110      matchLabels:
   111        app: empire-outpost
   112        outpostid: "8888"
   113    replicas: 1
   114    template:
   115      metadata:
   116        labels:
   117          app: empire-outpost
   118          outpostid: "8888"
   119      spec:
   120        containers:
   121        - name: empire-outpost-8888
   122          image: docker.io/cilium/kafkaclient
   123  ---
   124  apiVersion: apps/v1
   125  kind: Deployment
   126  metadata:
   127    name: empire-outpost-9999
   128  spec:
   129    selector:
   130      matchLabels:
   131        app: empire-outpost
   132        outpostid: "9999"
   133    replicas: 1
   134    template:
   135      metadata:
   136        labels:
   137          app: empire-outpost
   138          outpostid: "9999"
   139      spec:
   140        containers:
   141        - name: empire-outpost-9999
   142          image: docker.io/cilium/kafkaclient
   143  ---
   144  apiVersion: apps/v1
   145  kind: Deployment
   146  metadata:
   147    name: empire-backup
   148  spec:
   149    selector:
   150      matchLabels:
   151        app: empire-backup
   152    replicas: 1
   153    template:
   154      metadata:
   155        labels:
   156          app: empire-backup
   157      spec:
   158        containers:
   159        - name: empire-backup
   160          image: docker.io/cilium/kafkaclient