apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: '84'
creationTimestamp: '2024-07-29T09:06:57Z'
generation: 84
labels:
app: kafka
managedFields:
- apiVersion: apps/v1
fieldsType: FieldsV1
fieldsV1:
'f:metadata':
'f:labels':
.: {}
'f:app': {}
'f:spec':
'f:progressDeadlineSeconds': {}
'f:replicas': {}
'f:revisionHistoryLimit': {}
'f:selector': {}
'f:strategy':
'f:rollingUpdate':
.: {}
'f:maxSurge': {}
'f:maxUnavailable': {}
'f:type': {}
'f:template':
'f:metadata':
'f:annotations': {}
'f:labels':
.: {}
'f:app': {}
'f:spec':
'f:containers':
'k:{"name":"kafka"}':
.: {}
'f:env':
.: {}
'k:{"name":"KAFKA_BROKER_ID"}':
.: {}
'f:name': {}
'k:{"name":"KAFKA_ZOOKEEPER_CONNECT"}':
.: {}
'f:name': {}
'f:value': {}
'f:image': {}
'f:imagePullPolicy': {}
'f:name': {}
'f:ports': {}
'f:resources':
.: {}
'f:requests':
.: {}
'f:cpu': {}
'f:memory': {}
'f:terminationMessagePath': {}
'f:terminationMessagePolicy': {}
'f:dnsPolicy': {}
'f:restartPolicy': {}
'f:schedulerName': {}
'f:securityContext': {}
'f:terminationGracePeriodSeconds': {}
manager: ACK-Console Apache-HttpClient
operation: Update
time: '2024-07-31T02:58:31Z'
- apiVersion: apps/v1
fieldsType: FieldsV1
fieldsV1:
'f:spec':
'f:template':
'f:metadata':
'f:annotations':
'f:redeploy-timestamp': {}
'f:spec':
'f:containers':
'k:{"name":"kafka"}':
'f:env':
'k:{"name":"KAFKA_BROKER_ID"}':
'f:value': {}
'k:{"name":"KAFKA_LISTENERS"}':
.: {}
'f:name': {}
'f:value': {}
'f:ports':
'k:{"containerPort":9092,"protocol":"TCP"}':
.: {}
'f:containerPort': {}
'f:protocol': {}
manager: okhttp
operation: Update
time: '2024-10-21T09:16:28Z'
- apiVersion: apps/v1
fieldsType: FieldsV1
fieldsV1:
'f:metadata':
'f:annotations':
.: {}
'f:deployment.kubernetes.io/revision': {}
'f:status':
'f:availableReplicas': {}
'f:conditions':
.: {}
'k:{"type":"Available"}':
.: {}
'f:lastTransitionTime': {}
'f:lastUpdateTime': {}
'f:message': {}
'f:reason': {}
'f:status': {}
'f:type': {}
'k:{"type":"Progressing"}':
.: {}
'f:lastTransitionTime': {}
'f:lastUpdateTime': {}
'f:message': {}
'f:reason': {}
'f:status': {}
'f:type': {}
'f:observedGeneration': {}
'f:readyReplicas': {}
'f:replicas': {}
'f:updatedReplicas': {}
manager: kube-controller-manager
operation: Update
subresource: status
time: '2024-10-21T09:16:30Z'
name: kafka
namespace: chongyejia-test
resourceVersion: '2543523473'
uid: 1143978b-3045-4704-a8cd-10b684b90ba8
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: kafka
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
redeploy-timestamp: '1729496504116'
labels:
app: kafka
spec:
containers:
- env:
- name: KAFKA_ZOOKEEPER_CONNECT
value: 'zookeeper-svc:2181'
- name: KAFKA_BROKER_ID
value: '1'
- name: KAFKA_LISTENERS
value: 'PLAINTEXT://:9092'
image: 'registry-vpc.cn-shanghai.aliyuncs.com/chongyejia/kafka:3.7.1-amd64'
imagePullPolicy: IfNotPresent
name: kafka
ports:
- containerPort: 9092
protocol: TCP
resources:
requests:
cpu: 100m
memory: 64Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status:
availableReplicas: 1
conditions:
- lastTransitionTime: '2024-10-21T09:14:45Z'
lastUpdateTime: '2024-10-21T09:14:45Z'
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: 'True'
type: Available
- lastTransitionTime: '2024-07-29T09:06:57Z'
lastUpdateTime: '2024-10-21T09:16:30Z'
message: ReplicaSet "kafka-5bbbd768f9" has successfully progressed.
reason: NewReplicaSetAvailable
status: 'True'
type: Progressing
observedGeneration: 84
readyReplicas: 1
replicas: 1
updatedReplicas: 1
这个是配置项,服务、路由都配过了,无法外网访问,转战内网,内网 Java 服务应该是可以调用到 brokers 并创建了话题,但是后续生产消费则会报无法连接对应 kafka |
|