Kubernetes activemq系列| k8s 部署activemq artemis

一、ActiveMQ Artemis介绍

Apache ActiveMQ Artemis 是一个高性能的开源消息代理,它完全符合 Java Message Service (JMS) 2.0 规范,并支持多种通信协议,包括 AMQP、MQTT、STOMP 和 OpenWire 等。ActiveMQ Artemis 由 Apache Software Foundation 开发和维护,旨在提供可靠的消息传递解决方案,适用于各种异步通信场景。

bin- 运行 ActiveMQ Artemis 所需的二进制文件和脚本。

examples- 各种例子。

lib- 运行 ActiveMQ Artemis 所需的 jar 和库

schema- 用于验证 ActiveMQ Artemis 配置文件的 XML 模式

web- 代理运行时加载 Web 上下文的文件夹。

api- api 文档放在 web 文件夹下。

user-manual- 用户手册位于 web 文件夹下。

二、k8s 部署activemq artemis

官方镜像地址

https://hub.docker.com/r/apache/activemq-artemis/tags

yaml 复制代码
apiVersion: v1
kind: Service
metadata:
  name: nodeport-activemq
spec:
  selector:
    app: activemq
  ports:
    - port: 8161
      targetPort: 8161
      nodePort: 30066   
      name: admin
      protocol: TCP
    - port: 61616
      targetPort: 61616
      nodePort: 30067
      protocol: TCP
      name: tcp  
    - port: 1883
      targetPort: 1883
      nodePort: 30068
      protocol: TCP
      name: tcp2 
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: deploy-activemq
spec:
  replicas: 1
  selector:
    matchLabels:
      app: activemq
  template:
    metadata:
      labels:
        app: activemq
    spec:
      nodeName: k8s-work01
      containers:
      - name: activemq
        image: apache/activemq-artemis:latest
        ports:
          - containerPort: 8161  #web端口
            protocol: TCP
          - containerPort: 61616  #服务端端口
            protocol: TCP
          - containerPort: 1883  #MQTT端口
            protocol: TCP

AMQP端口:默认为5672端口,用于AMQP(高级消息队列协议)的通信。

OpenWire端口:默认为61616端口,用于OpenWire协议的通信,OpenWire是ActiveMQ自身的二进制协议。

STOMP端口:默认为61613端口,用于STOMP(简单文本协议)的通信。

HornetQ Core端口:默认为5445端口,用于HornetQ Core协议的通信。

Web管理端口:默认为8161端口,用于访问Web管理控制台。

JMX端口:默认为1099端口,用于Java管理扩展的远程管理。

MQTT端口:端口1883通常用于MQTT的非加密通信,而端口8883通常用于MQTT的加密通信(通过TLS/SSL)。

持续更新中关注不迷糊。。。

相关推荐
lichenyang45317 小时前
Docker 学习笔记(四):Dockerfile,把项目打成自己的镜像
docker·容器
lichenyang45317 小时前
Docker 学习笔记(三):Docker 网络、bridge、子网和容器互通
docker·容器
lichenyang45318 小时前
Docker 学习笔记(二):docker run 的参数到底在控制什么?
docker·容器
运维开发故事4 天前
基于 Arthas 的多集群在线诊断系统设计与实现
kubernetes
Patrick_Wilson5 天前
从「改个端口」到 502:Next.js on k8s 的容器端口、Service 映射与 env 覆盖
docker·kubernetes·next.js
探索云原生6 天前
K8s 1.36 这个 GA 特性,把 initContainer 拉模型的 hack 干掉了
ai·云原生·kubernetes
云恒要逆袭6 天前
运行你的第一个Docker容器
后端·docker·容器
Java之美7 天前
一次k8s升级引发的DevicePlugin注册失败
云原生·kubernetes
程序员老赵7 天前
10 分钟部署 OpenCode:Docker 一键安装,浏览器打开就能用 AI 写代码(附完整命令与排错)
docker·容器·ai编程