Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broker not found in Kubernetes deployment #52

Open
framctr opened this issue Mar 9, 2022 · 0 comments
Open

Broker not found in Kubernetes deployment #52

framctr opened this issue Mar 9, 2022 · 0 comments

Comments

@framctr
Copy link

framctr commented Mar 9, 2022

I'm trying to deploy rocketmq on my testing cluster. I started from the scripts provided in that repo, but they do not work. I modified them in the following way:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: rocketmq-namesrv
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rocketmq-namesrv
  template:
    metadata:
      labels:
        app: rocketmq-namesrv
    spec:
      containers:
      - name: namesrv
        image: myrepo/rocketmq:4.9.3-alpine
        command: ["sh", "mqnamesrv"]
        imagePullPolicy: IfNotPresent
        resources:
          limits:
            memory: "128Mi"
            cpu: "400m"
        ports:
        - containerPort: 9876
        volumeMounts:
        - name: namesrv-log
          mountPath: /var/log
      volumes:
      - name: namesrv-log
        persistentVolumeClaim:
          claimName: rocketmq-namesrv-pvc

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: rocketmq-broker
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rocketmq-broker
  template:
    metadata:
      labels:
        app: rocketmq-broker
    spec:
      containers:
      - name: broker
        image: myrepo/rocketmq:4.9.3-alpine
        command: ["sh", "mqbroker", "-n", "localhost:9876"]
        imagePullPolicy: IfNotPresent
        resources:
          limits:
            memory: "128Mi"
            cpu: "400m"
        ports:
        - containerPort: 10909
        - containerPort: 10911
        volumeMounts:
        - name: broker-log
          mountPath: /var/log
        - name: broker-store
          mountPath: /home/rocketmq
      volumes:
      - name: broker-log
        persistentVolumeClaim:
          claimName: rocketmq-broker-log-pvc
      - name: broker-store
        persistentVolumeClaim:
          claimName: rocketmq-broker-store-pvc

The image rocketmq:4.9.3-alpine was created following the procedure on that repo.

After the deployment the rocketmq-namesrv works, but the broker's pod logs: sh: can't open 'mqbroker': No such file or directory...

What could it be? Am I making something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant