# Custom extensions in Kubernetes

**URL:** <https://community.hivemq.com/t/custom-extensions-in-kubernetes/893>\
**Category:** HiveMQ Swarm\
**Created:** [December 15, 2021, 3:28pm UTC](https://community.hivemq.com/t/custom-extensions-in-kubernetes/893 "2021-12-15T15:28:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arne\_h](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@arne\_h](https://community.hivemq.com/u/arne_h)\
**Post date:** [December 15, 2021, 3:28pm UTC](https://community.hivemq.com/t/custom-extensions-in-kubernetes/893/1 "2021-12-15T15:28:36Z")

</div>

Hello,

is there an easy way to include custom extensions when deploying on Kubernetes cluster using your helm charts?

Kind regards,  
Arne

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [December 15, 2021, 4:50pm UTC](https://community.hivemq.com/t/custom-extensions-in-kubernetes/893/2 "2021-12-15T16:50:50Z")

</div>

Hello Arne,

Welcome to our community forum! It is great that you are interested in MQTT and HiveMQ.

To install your custom extensions, use the `extensions` field in your custom **[values.yaml](https://github.com/hivemq/helm-charts/blob/master/charts/hivemq-operator/values.yaml)** file.  
Check out the [HiveMQ Kubernetes Operator::Add and Remove Extensions](https://www.hivemq.com/docs/operator/4.7/kubernetes-operator/configuration.html#add-remove-ext) for all the configuration details.

I hope this information helps. Have fun with your HiveMQ journey!

Dasha from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![arne\_h](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@arne\_h](https://community.hivemq.com/u/arne_h)\
**Post date:** [December 17, 2021, 7:44am UTC](https://community.hivemq.com/t/custom-extensions-in-kubernetes/893/3 "2021-12-17T07:44:22Z")

</div>

Hello Dasha,

Thanks for the response, but thats not what i meant. The Swarm deployment does work without the Kubernetes Operator. Also there is no extensions field in the values.yaml of the Swarm deployment.  
So is there an equal way to install custom extensions for swarm?

Arne

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [December 17, 2021, 10:07am UTC](https://community.hivemq.com/t/custom-extensions-in-kubernetes/893/4 "2021-12-17T10:07:17Z")

</div>

Hi Arne,

Thanks for clarification!

1. You are correct, there is no “extensions” field in the values.yaml of the hivemq-swarm.

2. The way to install a custom Swarm extension is to put the extension `*.jar` file to `${SWARM_HOME}/extensions/` directory.

More info on how to prepare the customer `*.jar` file and use in `scenario.xml` you can find here: [HiveMQ Swarm Extensions :: HiveMQ Documentation](https://www.hivemq.com/docs/swarm/4.7/swarm/extensions.html#develop-extension)

Kind regards,  
Dasha

---

<div class="post-metadata">

**Author:** ![stefanjay](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@stefanjay](https://community.hivemq.com/u/stefanjay)\
**Post date:** [September 1, 2022, 7:36pm UTC](https://community.hivemq.com/t/custom-extensions-in-kubernetes/893/5 "2022-09-01T19:36:28Z")

</div>

…old one but for completion:

the path in swarm is simply `/extensions` - that means in k8s helm values.yaml

1. create a configmap with  
` kubectl -n hivemq-swarm create cm your-extension-cm --from-file=your-extension.jar`

2. add to your helm values.yaml to mount the file into the swarm containers

```auto
  extraVolumes:
    - name: your-extension
      configMap:
        name: your-extension-cm # name of the configMap from step #1

  extraVolumeMounts:
    - mountPath: /extensions
      name: your-extension # name of the extraVolume

```
