以下YAML文件从本地搭建的KubeSphere工作负载中导出,可能因关联保密字典Secret、配置字典ConfigMap、服务Service等无法直接运行,仅供参考。
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: kafka
namespace: supports
labels:
app: kafka
annotations:
kubesphere.io/creator: admin
spec:
replicas: 1
selector:
matchLabels:
app: kafka
template:
metadata:
creationTimestamp: null
labels:
app: kafka
annotations:
kubesphere.io/creator: admin
kubesphere.io/imagepullsecrets: '{}'
kubesphere.io/restartedAt: '2023-08-25T07:28:45.297Z'
spec:
volumes:
- name: host-time
hostPath:
path: /etc/localtime
type: ''
containers:
- name: container-kafka
image: 'bitnami/kafka:3.4'
ports:
- name: tcp-9092
containerPort: 9092
protocol: TCP
env:
- name: KAFKA_ZOOKEEPER_CONNECT
value: >-
zookeeper-0.zookeeper-headless.supports.svc.cluster.local:2181,zookeeper-1.zookeeper-headless.supports.svc.cluster.local:2181,zookeeper-2.zookeeper-headless.supports.svc.cluster.local:2181
- name: KAFKA_ADVERTISED_LISTENERS
value: 'PLAINTEXT://192.168.89.237:30614'
resources: {}
volumeMounts:
- name: host-time
readOnly: true
mountPath: /etc/localtime
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
serviceAccountName: default
serviceAccount: default
securityContext: {}
schedulerName: default-scheduler
serviceName: kafka-service
podManagementPolicy: OrderedReady
updateStrategy:
type: RollingUpdate
rollingUpdate:
partition: 0
revisionHistoryLimit: 10