KubeMQ官方文档

1.获取用户token

官方用户注册登录地址

2.yaml


kubectl apply -f https://deploy.kubemq.io/init

# 注册用户获取token 
kubectl apply -f https://deploy.kubemq.io/key/<kubemq-registration-token>

3.安装kubemqctl

github不同版本的kubemqctl

#mac os
curl -L https://github.com/kubemq-io/kubemqctl/releases/download/latest/kubemqctl_darwin_amd64 -o /usr/local/bin/kubemqctl 
chmod +x /usr/local/bin/kubemqctl

# linux 64位
curl -L https://github.com/kubemq-io/kubemqctl/releases/download/latest/kubemqctl_linux_amd64 -o /usr/local/bin/kubemqctl
chmod +x /usr/local/bin/kubemqctl

# linux 32位
curl -L https://github.com/kubemq-io/kubemqctl/releases/download/latest/kubemqctl_linux_386 -o /usr/local/bin/kubemqctl
chmod +x /usr/local/bin/kubemqctl

4.测试

kubemqctl queue send my-queue hello-world

kubemqctl queue receive my-queue

5.修改集群规模

在这里插入图片描述

# 先删除原有创建的集群,如上图所示
kubemqctl delete cluster

# 重新创建大小位1的mq集群
kubemqctl create cluster --replicas 1 --key=${license key}

5.1.安装 kubemq dashboard

kubemqctl create dashboard
kubemqctl get dashboard

# 给dashboard所在的node暴露个端口供外部访问
apiVersion: v1
kind: Service
metadata:
  namespace: kubemq
  name: kubemq-dashboard-svc
  labels:
    app: kubemq
spec:
  selector:
    app: kubemq-dashboard
  type: NodePort
  ports:
    - port: 3000
      targetPort: 3000
      nodePort: 30016

访问该Pod所在的Node的IP暴露的端口http://x.x.x.x:30016/?orgId=1
在这里插入图片描述

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐