Dremio OSS on K3S - How to Set a Fixed Port for Dremio UI on k3s?

Hi everyone,

I’m deploying Dremio on a k3s cluster, and I’m running into an issue with accessing the UI from external machines. Here’s the situation:

  • The Dremio UI is configured to run on port 9047 inside the container.
  • When I expose the service using a NodePort, Kubernetes assigns a random port within the range 31000-32000.
  • I need the UI to be accessible via a fixed port because I’ll configure a DNS entry, and having a dynamic port range creates issues when restarting the server or reapplying configurations.

My YAML looks like this:

imageTag: 25.2

coordinator:
  cpu: 4
  memory: 8000
  volumeSize: 40Gi

executor:
  cpu: 7
  memory: 11000
  volumeSize: 10Gi
  count: 1

distStorage:
  type: aws
  aws:
    path: '/'
    bucketName: "dremio"
    authentication: "accessKeySecret"
    credentials:
      accessKey: "MYKEY"
      secret: "MYSECRET"
    extraProperties: |
      <property>
        <name>fs.s3a.endpoint</name>
        <value>MYENDPOINT</value>
      </property>
      <property>
        <name>fs.s3a.path.style.access</name>
        <value>true</value>
      </property>
      <property>
        <name>fs.s3a.connection.ssl.enabled</name>
        <value>false</value>
      </property>
      <property>
        <name>dremio.s3.compat</name>
        <value>true</value>
      </property>

zookeeper:
  image: zookeeper
  imageTag: 3.8.4-jre-17

  cpu: 0.5
  memory: 1024
  count: 1

  volumeSize: 5Gi

Here’s what I’m looking for:

  1. How can I configure the Dremio service in k3s to always use a specific NodePort, like 31047?
  2. Is there a better way to expose the Dremio UI with a fixed port, perhaps using an Ingress or LoadBalancer?

Any guidance, examples, or best practices would be greatly appreciated!

Thank you in advance!

@lucasnvk Are you saying K3s changes the port even after defining below? Then this is something yo check with K3’s, do you see the same behavior if K8s is used instead of k3s?

# Web UI
  web:
    port: 9047
    tls:
      # To enable TLS for the web UI, set the enabled flag to true and provide
      # the appropriate Kubernetes TLS secret.
      enabled: false

      # To create a TLS secret, use the following command:
      # kubectl create secret tls ${TLS_SECRET_NAME} --key ${KEY_FILE} --cert ${CERT_FILE}
      secret: dremio-tls-secret-ui