|
| 1 | +# |
| 2 | +# Copyright © 2016-2021 The Thingsboard Authors |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# |
| 16 | + |
| 17 | +###################################################################################################################### |
| 18 | +# Kafka manager with web UI to monitor and maintain Kafka's clusters |
| 19 | +# see details on https://github.com/yahoo/CMAK |
| 20 | +# container on https://hub.docker.com/r/kafkamanager/kafka-manager |
| 21 | +# $ kubectl port-forward tb-kafka-ui-0 9000:9000 |
| 22 | +# goto weblink: http://localhost:9000 |
| 23 | +# First step - add cluster config (will not affect existing cluster, just fetch config from zookeper for a first time) |
| 24 | +# Scale up/down if you don't need it |
| 25 | +# $ kubectl scale --replicas=0 statefulset/tb-kafka-ui |
| 26 | +# Enjoy |
| 27 | +###################################################################################################################### |
| 28 | + |
| 29 | +apiVersion: apps/v1 |
| 30 | +kind: StatefulSet |
| 31 | +metadata: |
| 32 | + name: tb-kafka-ui |
| 33 | +spec: |
| 34 | + replicas: 1 |
| 35 | + podManagementPolicy: Parallel |
| 36 | + selector: |
| 37 | + matchLabels: |
| 38 | + app: tb-kafka-ui |
| 39 | + template: |
| 40 | + metadata: |
| 41 | + labels: |
| 42 | + app: tb-kafka-ui |
| 43 | + spec: |
| 44 | + imagePullSecrets: |
| 45 | + - name: regcred |
| 46 | +# securityContext: |
| 47 | +# runAsUser: 100500 |
| 48 | +# runAsNonRoot: true |
| 49 | +# runAsGroup: 100500 |
| 50 | + containers: |
| 51 | + - name: server |
| 52 | + imagePullPolicy: Always |
| 53 | + image: docker.io/kafkamanager/kafka-manager:3.0.0.4 |
| 54 | + resources: |
| 55 | + requests: |
| 56 | + cpu: 500m |
| 57 | + memory: 1Gi |
| 58 | + limits: |
| 59 | + cpu: 500m |
| 60 | + memory: 1Gi |
| 61 | + ports: |
| 62 | + - containerPort: 9000 |
| 63 | + name: http9000 |
| 64 | + env: |
| 65 | + - name: ZK_HOSTS |
| 66 | + value: "zookeeper-helm-headless:2181" #place here your zookeeper(s) |
| 67 | + - name: JAVA_OPTS |
| 68 | + value: "-Xms768m -Xmx768m -Dpidfile.path=/dev/null -Djava.net.preferIPv4Stack=true" |
| 69 | + restartPolicy: Always |
0 commit comments