k8s部署KubeMQ
KubeMQ官方文档1.获取用户token官方用户注册登录地址2.yamlkubectl apply -f https://deploy.kubemq.io/init# 注册用户获取tokenkubectl apply -f https://deploy.kubemq.io/key/<kubemq-registration-token>3.安装kubemqctlgithub不同版本的k
·
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
#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
更多推荐
已为社区贡献16条内容
所有评论(0)