Main Content

Run MATLAB Parallel Server on Kubernetes

Deploy MATLAB® Parallel Server™ and MATLAB Job Scheduler on a Kubernetes® cluster using a Helm® chart.

Requirements

To use this reference architecture, you need:

  • A running Kubernetes cluster that meets the following conditions:

    • Uses Kubernetes version 1.21.1 or later.

    • Meets the system requirements for running MATLAB Job Scheduler. For details, see MATLAB Parallel Server Product Requirements.

    • Configured to create external load balancers that allow traffic into the cluster.

  • Docker® installed on your computer. For help with installing Docker, see https://docs.docker.com/get-docker.

  • kubectl command-line tool installed on your computer and configured to access your Kubernetes cluster. For help with installing kubectl, see Install Tools on the Kubernetes website.

  • Helm package manager version 3.8.0 or later installed on your computer. For help with installing Helm, see Quickstart Guide on the Helm website.

  • Network access to the MathWorks® container registry, containers.mathworks.com and the GitHub® Container registry, ghcr.io.

  • A MATLAB Parallel Server license. For an overview of MATLAB Parallel Server licensing, see Determining License Size for MATLAB Parallel Server.

    You can use either:

    • A network license manager for MATLAB hosting sufficient MATLAB Parallel Server licenses for your cluster. The license manager must be accessible from the Kubernetes cluster. You can install or use an existing network license manager running on-premises or on AWS®. To install a network license manager on-premises, see Install License Manager on License Server. To deploy a network license manager reference architecture on AWS, select a MATLAB release from Network License Manager for MATLAB on AWS (GitHub).

    • A MATLAB Parallel Server license configured to use online licensing. To view and modify the license manager type, see Select Licensing Configuration Option.

    The default MATLAB Parallel Server installation provided as part of the Kubernetes MathWorks reference architecture uses a network license manager by default. This license manager might differ from your current license configuration.

Deploy From GitHub

To deploy MATLAB Parallel Server in Kubernetes, use the Helm chart and deployment instructions provided in the following GitHub repository:

Architecture and Resources for MATLAB Parallel Server in Kubernetes

Deploying MATLAB Parallel Server and MATLAB Job Scheduler onto a Kubernetes cluster creates several pods and a load balancer in your Kubernetes cluster. This table summarizes the deployed resources.

Resource NameDescription

mjs-job-manager

The MATLAB Job Scheduler job manager is the central management point for submitting, queuing, and distributing MATLAB jobs across the available workers in the cluster.

mjs-controller

A controller process that monitors MATLAB Job Scheduler and creates and destroys MATLAB workers based on the job manager's requirements.

mjs-worker-n

MATLAB workers, which are independent processes that perform computations. Each worker has its own pod. The mjs-controller creates and destroys workers.

Load Balancer

A load balancer service to expose MATLAB Job Scheduler to MATLAB clients running outside of the Kubernetes cluster.

mjs-pool-proxy-n

A proxy process for parallel pools of MATLAB workers. Each MATLAB worker within the cluster is associated with a specific proxy. The mjs-controller creates and destroys pool proxies based on the number of workers, installing each pool proxy in its own pod.

mjs-ingress-proxy

A proxy process that routes traffic from the load balancer to the MATLAB Job Scheduler and pool proxies.

By default, connections between MATLAB clients and the pods in Kubernetes are verified using mutual TLS (mTLS). This diagram shows the connections between the client and the pods.

The architecture created during the MATLAB Parallel Server deployment on the Kubernetes cluster.

Related Topics