k8s kubesphere 部署 rocketmq
访问可视化界面,就是你console-svc的服务地址。kubesphere界面配置。创建nameserver服务。创建console-svc。kubesphere配置。
·
控制台配置
即可视化界面
kind: Deployment
apiVersion: apps/v1
metadata:
name: rocketmq-console
namespace: your-namespace
labels:
app: rocketmq-console
annotations:
deployment.kubernetes.io/revision: '3'
kubesphere.io/creator: zhangsan
kubesphere.io/description: rocketmq可视化服务
spec:
replicas: 1
selector:
matchLabels:
app: rocketmq-console
template:
metadata:
creationTimestamp: null
labels:
app: rocketmq-console
spec:
volumes:
- name: host-time
hostPath:
path: /etc/localtime
type: ''
containers:
- name: rocketmq-console
image: 'styletang/rocketmq-console-ng:1.0.0'
ports:
- name: http-8080
containerPort: 8080
protocol: TCP
env:
- name: JAVA_OPTS
value: >-
-Drocketmq.namesrv.addr=host:9876
-Dcom.rocketmq.sendMessageWithVIPChannel=false
resources:
limits:
cpu: '2'
memory: 4000Mi
requests:
cpu: 10m
memory: 10Mi
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
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
kubesphere配置
broker节点配置
k8s配置
kind: Deployment
apiVersion: apps/v1
metadata:
name: rocketmq-broker
namespace: your-namespace
labels:
app: rocketmq-broker
annotations:
deployment.kubernetes.io/revision: '7'
kubesphere.io/alias-name: broker
kubesphere.io/creator: zhangsan
spec:
replicas: 1
selector:
matchLabels:
app: rocketmq-broker
template:
metadata:
creationTimestamp: null
labels:
app: rocketmq-broker
annotations:
logging.kubesphere.io/logsidecar-config: '{}'
spec:
volumes:
- name: host-time
hostPath:
path: /etc/localtime
type: ''
- name: volume-nude2u
configMap:
name: rocket-conf
items:
- key: broker.conf
path: broker.conf
defaultMode: 420
containers:
- name: rocketmq-broker
image: 'rocketmqinc/rocketmq:4.3.2'
command:
- sh
args:
- mqbroker
- '-c'
- /opt/rocketmq-4.3.2/conf/broker.conf
ports:
- name: tcp-10909
containerPort: 10909
protocol: TCP
- name: tcp-10911
containerPort: 10911
protocol: TCP
env:
- name: NAMESRV_ADDR
value: 'host:9876'
resources:
limits:
cpu: '2'
memory: 4000Mi
requests:
cpu: 10m
memory: 10Mi
volumeMounts:
- name: host-time
readOnly: true
mountPath: /etc/localtime
- name: volume-nude2u
readOnly: true
mountPath: /opt/rocketmq-4.3.2/conf/broker.conf
subPath: broker.conf
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
serviceAccountName: default
serviceAccount: default
securityContext: {}
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
kubesphere界面配置
nameserver配置
yaml文件
kind: Deployment
apiVersion: apps/v1
metadata:
name: rocketmq
namespace: your-namespace
labels:
app: rocketmq
annotations:
deployment.kubernetes.io/revision: '4'
kubesphere.io/alias-name: nameserver
kubesphere.io/creator: zhangsan
spec:
replicas: 1
selector:
matchLabels:
app: rocketmq
template:
metadata:
creationTimestamp: null
labels:
app: rocketmq
annotations:
kubesphere.io/restartedAt: '2023-10-20T03:11:56.869Z'
spec:
volumes:
- name: host-time
hostPath:
path: /etc/localtime
type: ''
containers:
- name: rocketmq-nameserver
image: 'rocketmqinc/rocketmq:4.3.2'
command:
- sh
args:
- mqnamesrv
ports:
- name: tcp-9876
containerPort: 9876
protocol: TCP
resources:
limits:
cpu: '2'
memory: 4000Mi
requests:
cpu: 10m
memory: 10Mi
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
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 25%
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
kubesphere
创建nameserver服务
创建console-svc
完成。访问可视化界面,就是你console-svc的服务地址
更多推荐
已为社区贡献1条内容
所有评论(0)