KUBERNETES DEPLOYMENT快速部署ROCKETMQ 4.9.2 DLEDGER集群 1-镜像
KUBERNETES DEPLOYMENT快速部署ROCKETMQ 4.9.2 DLEDGER集群 2-NAMESERVER
KUBERNETES DEPLOYMENT快速部署ROCKETMQ 4.9.2 DLEDGER集群 3-BROKER
KUBERNETES DEPLOYMENT快速部署ROCKETMQ 4.9.2 DLEDGER集群 4-DASHBOARD

namesrv

启动两个独立的nameserver
ns:

kubectl create namespace rocketmq

Deployment nameserver-01:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    mq: nameserver-01
  name: nameserver-01
  namespace: rocketmq
spec:
  replicas: 1
  selector:
    matchLabels:
      mq: nameserver-01
  template:
    metadata:
      labels:
        mq: nameserver-01
    spec:
      containers:
        - command:
            - sh
            - mqnamesrv
          env:
            - name: TZ
              value: Asia/Shanghai
          image: 'test/rocketmq:4.9.2'
          imagePullPolicy: IfNotPresent
          name: nameserver-01
          ports:
            - containerPort: 9876
              name: nameserver
              protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
  labels:
    mq: nameserver-01
  name: nameserver-01
  namespace: rocketmq
spec:
  ports:
    - name: nameserver
      port: 9876
      protocol: TCP
      targetPort: 9876
  selector:
    mq: nameserver-01
  type: ClusterIP

Deployment nameserver-02:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    mq: nameserver-02
  name: nameserver-02
  namespace: rocketmq
spec:
  replicas: 1
  selector:
    matchLabels:
      mq: nameserver-02
  template:
    metadata:
      labels:
        mq: nameserver-02
    spec:
      containers:
        - command:
            - sh
            - mqnamesrv
          env:
            - name: TZ
              value: Asia/Shanghai
          image: 'test/rocketmq:4.9.2'
          imagePullPolicy: IfNotPresent
          name: nameserver-02
          ports:
            - containerPort: 9876
              name: nameserver
              protocol: TCP

---
apiVersion: v1
kind: Service
metadata:
  labels:
    mq: nameserver-02
  name: nameserver-02
  namespace: rocketmq
spec:
  ports:
    - name: nameserver
      port: 9876
      protocol: TCP
      targetPort: 9876
  selector:
    mq: nameserver-02
  type: ClusterIP

1 对 “kubernetes Deployment快速部署rocketmq 4.9.2 dledger集群 2-nameserver”的想法;

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code