WEKA Operator deployment
Discover how the WEKA Operator streamlines deploying, scaling, and managing the WEKA Data Platform on Kubernetes, delivering high-performance storage for compute-intensive workloads like AI and HPC.
Overview
The WEKA Operator simplifies deploying, managing, and scaling the WEKA Data Platform within a Kubernetes cluster. It provides custom Kubernetes resources that define and manage WEKA components effectively.
By integrating WEKA's high-performance storage into Kubernetes, the Operator supports compute-intensive applications like AI, ML, and HPC. This enhances data access speed and boosts overall performance.
The WEKA Operator automates tasks, enables periodic maintenance, and ensures robust cluster management. This setup provides resilience and scalability across the cluster. With its persistent, high-performance data layer, the WEKA Operator enables efficient management of large datasets, ensuring scalability and efficiency.
Target audience: This guide is intended exclusively for experienced Kubernetes cluster administrators. It provides detailed procedures for deploying the WEKA Operator on a Kubernetes cluster that meets the specified requirements.
WEKA Operator backend deployment overview
The WEKA Operator backend deployment integrates various components within a Kubernetes cluster to deploy, manage, and scale the WEKA Data Platform effectively.
How it works
Local Server Setup: This setup integrates Kubernetes with the WekaCluster custom resources (CRDs) and facilitates WEKA Operator installation through Helm. Configuring Helm registry authentication provides access to the necessary CRDs and initiates the operator installation.
WekaCluster CR: The WekaCluster CR defines the WEKA cluster’s configuration, including storage, memory, and resource limits, while optimizing memory and CPU settings to prevent out-of-memory errors. Cluster and container management also support operational tasks through on-demand executions (through WekaManualOperation) and scheduled tasks (through WekaPolicy).
WEKA Operator:
The WEKA Operator retrieves Kubernetes configurations from WekaCluster CRs, grouping multiple WEKA containers to organize WEKA nodes into a single unified cluster.
To enable access to WEKA container images, the Operator retrieves credentials from Kubernetes secrets in each namespace that requires WEKA resources.
Using templates, it calculates the required number of containers and deploys the WEKA cluster on Kubernetes backends through a CRD.
Each node requires specific Kubelet configurations—such as kernel headers, storage allocations, and huge page settings—to optimize memory management for the WEKA containers. Data is stored in the
/opt/k8s-weka
directory on each node, with CPU and memory allocations determined by the number of WEKA containers and available CPU cores per node.
Driver Distribution Model: This model ensures efficient kernel module loading and compatibility across nodes, supporting scalable deployment for both clients and backends. It operates through three primary roles:
Distribution Service: A central repository storing and serving WEKA drivers for seamless access across nodes.
Drivers Builder: Compiles drivers for specific WEKA versions and kernel targets, uploading them to the Distribution Service. Multiple builders can run concurrently to support the same repository.
Drivers Loader: Automatically detects missing drivers, retrieves them from the Distribution Service, and loads them using
modprobe
.
WEKA Operator client deployment overview
The WEKA Operator client deployment uses the WekaClient custom resource to manage WEKA containers across a set of designated nodes, similar to a DaemonSet. Each WekaClient instance provisions WEKA containers as individual pods, creating a persistent layer that supports high availability by allowing safe pod recreation when necessary.
How it works
Deployment initiation: The user starts the deployment from a local server, which triggers the process.
Custom resource retrieval: The WEKA Operator retrieves the WekaClient custom resource (CR) configuration. This CR defines which nodes in the Kubernetes cluster run WEKA containers.
WEKA containers deployment: Based on the WekaClient CR, the Operator deploys WEKA containers across the specified Kubernetes client nodes. Each WEKA container instance runs as a single pod, similar to a DaemonSet.
Persistent storage setup: Using the WEKA Container Storage Interface (CSI) plugin, the WEKA Operator sets up a persistent volume (PV) for the clients. This storage is managed by the WEKA Operator and is a prerequisite for clients relying on WEKA.
High availability: The WEKA containers act as a persistent layer, enabling each pod to be safely recreated as needed. This supports high availability by ensuring continuous service even if individual pods are restarted or moved.
Deployment workflow
Obtain setup information.
Prepare Kubernetes environment.
Install the WEKA Operator.
Set up driver distribution.
Install the WekaCluster and WekaClient custom resources.
1. Obtain setup information
To deploy the WEKA Operator in your Kubernetes environment, contact the WEKA Customer Success Team to obtain the necessary setup information.
Container repository (quay.io)
Includes: Image pull secrets and Docker
QUAY_USERNAME
QUAY_PASSWORD
QUAY_SECRET_KEY
example_user
example_password
quay-io-robot-secret
WEKA Operator Version
WEKA_OPERATOR_VERSION
v1.1.0
WEKA Image
WEKA_IMAGE_VERSION_TAG
4.3.5.105-dist-drivers.5
By gathering this information in advance, you have all the required values to complete the deployment workflow efficiently. Replace the placeholders with the actual values in the setup files.
2. Prepare Kubernetes environment
Ensure the following requirements are met:
Local server requirements
Kubernetes cluster and node requirements
Kubelet requirements
Image pull secrets requirements
Local server requirements
Ensure access to a server for manual
helm install
, unless a higher-level tool (for example, Argo CD) is used.
Kubernetes cluster and node requirements
Ensure that Kubernetes is correctly set up and configured to handle WEKA workloads.
Kernel headers: Ensure kernel headers on each node match the kernel version.
Storage: Allocate storage on
/opt/k8s-weka
for WEKA containers. Estimate: ~10 GiB per WEKA container + 20 GiB per CPU core in use.Huge pages configuration:
Compute core: 3 GiB of huge pages
Drive core: 1.5 GiB of huge pages
Client core: 1.5 GiB of huge pages Check current huge pages with command:
grep Huge /proc/meminfo
Add the appropriate number of huge pages:
sudo sysctl -w vm.nr_hugepages=3000
Set huge pages to persist through reboots:
sudo sh -c 'echo "vm.nr_hugepages = 3000" >> /etc/sysctl.conf'
Kubelet requirements
Configure Kubelet with static CPU management to enable exclusive CPU allocation:
reservedSystemCPUs: "0"
cpuManagerPolicy: static
Check which configmap holds the kubelet config.
kubectl get cm -A|grep kubeletg
If there are more than one kubelet config, modify the config for worker nodes.Edit the kubelet config map to add the CPU settings.
kubectl edit cm -n kube-system kubelet-config
Image pull secrets requirements
Set up Kubernetes secrets for secure image pulling across namespaces. Apply the secret in all namespaces where WEKA resources are deployed.
Verify that namespaces are defined and do not overlap to avoid configuration conflicts.
Example:
The following example creates a secret for quay.io authentication for both the weka-operator-system
namespace and the default
namespace. Repeat as necessary for namespaces. Replace the placeholders with the actual values.
3. Install the WEKA Operator
Apply WEKA Custom Resource Definitions (CRDs): Download and apply the WEKA Operator CRDs to define WEKA-specific resources in Kubernetes. Replace the version placeholder(WEKA_OPERATOR_VERSION) with the actual value
Install the WEKA Operator: Deploy the WEKA Operator to the Kubernetes cluster. Specify the namespace, image version, and pull secret to enable WEKA’s resources. Replace the version placeholder(WEKA_OPERATOR_VERSION) with the actual value.
Verify the installation: Run the following:
kubectl -n weka-operator-system get pod
The returned results should look similar to this:
4. Set up driver distribution
Driver distribution applies to client and backend entities.
Verify driver distribution prerequisites:
Ensure a WEKA-compatible image (
weka-in-container
) is accessible through the registry and has the necessary credentials (imagePullSecret
).Define node selection criteria, especially for the Driver Builder role, to match the kernel requirements of target nodes.
Set up the driver distribution service and driver builder: Replace the container version tag (WEKA_IMAGE_VERSION_TAG) placeholders with the actual values:
Ensure that nodeSelector
or nodeAffinity
aligns with the kernel requirements of the build nodes.
Save the manifest above to
weka-driver.yaml
, and apply it:kubectl apply -f weka-driver.yaml
5. Install the WekaCluster and WekaClient custom resources
To proceed, choose one or both of the following options based on your requirements:
Install the WekaCluster CR
Install the WekaClient CR
If both components are needed, ensure that you begin with the WekaCluster CR before installing the WekaClient CR.
Install the WekaCluster CR
To install the WekaCluster using the WekaCluster Custom Resource (CR), follow this high-level process:
Configure driver distribution: Set up the driver distribution service as with WEKA clients. See 4. Set up driver distribution.
Sign and discover drives: Use the
WekaManualOperation
(recommended for first-time setup) orWekaPolicy
to sign and discover drives. See Discover drives for WEKA cluster provisioning.Define the WekaCluster specification: Create a WekaCluster CR with the necessary parameters, as demonstrated in the following example:
Install the WekaClient CR
The WekaClient Custom Resource (CR) functions similarly to a Kubernetes DaemonSet by deploying an instance of WekaContainer
per matching node. However, unlike a DaemonSet, pods are not automatically removed if they no longer meet the node selection criteria.
WekaClient specification options:
The following fields are available in the WekaClientSpec
struct to configure the WekaClient CR:
Example manifest for deploying a WekaClient resource:
After the WekaClient CR installation is completed, you can install the WEKA CSI Plugin. See the WEKA CSI Plugin topic in the WEKA documentation.
Discover drives for WEKA cluster provisioning
To provision drives for a WEKA cluster, each drive must go through a discovery process. This process ensures that all drives are correctly identified, accessible, and ready for use within the cluster.
The discovery process involves the following key actions:
Node updates during discovery
Each node is annotated with a list of known serial IDs for all drives accessible to the operator, providing a unique identifier for each drive.
An extended resource,
weka.io/drives
, is created to indicate the number of drives that are ready and available on each node.
Available drives
Only healthy, unblocked drives are marked as available. Drives that are manually flagged due to issues such as corruption or other unrecoverable errors are excluded from the available pool to ensure cluster stability.
Drive discovery steps
Sign drives Each drive receives a WEKA-specific signature, marking it as ready for discovery and integration into the cluster.
Discover drives The signed drives are detected and prepared for cluster operations. If drives already have the WEKA signature, only the discovery step is required to verify and track them in the cluster.
Drive discovery methods
The WEKA system supports two primary methods for drive discovery:
WekaManualOperation A one-time operation that performs both drive signing and discovery, suitable for manual provisioning.
WekaPolicy An automated, policy-driven approach that performs periodic discovery across all matching nodes. The
WekaPolicy
method operates on an event-driven model, initiating discovery immediately when relevant changes (such as node updates or drive additions) are detected.
Example manual operations:
The following operation signs specific drives:
Drive selection types:
all-not-root
: Avoids using additional block devices aside from the root device.aws-all
: AWS-specific, detects NVMe devices by AWS PCI identifiers.device-paths
: Lists specific device paths, as shown in the example. Each node presents its subset of this list.
Drive discovery example:
The following example initiates a drive discovery operation:
Key fields:
nodeSelector
(payload): Limits the operation to specific nodes.tolerations
(spec): Supports Kubernetes tolerations for high-level objects like WekaCluster and WekaClient. Onlytolerations
are supported for WekaManualOperation, WekaContainer, and WekaPolicy.
Upgrade the WEKA Operator
Upgrading the WEKA Operator involves updating the Operator and managing wekaClient
configurations to ensure all client pods operate on the latest version. Additionally, each WEKA version requires a new builder instance with a unique wekaContainer
metadata name, ensuring compatibility and streamlined management of version-specific resources.
Procedure:
Upgrade the WEKA Operator Follow the steps in Install the WEKA Operator using the latest version. Re-running the installation process with the updated version upgrades the WEKA Operator without requiring additional setup.
Configure upgrade policies for
wekaClient
TheupgradePolicy
parameter in thewekaClient
Custom Resource (CR) specification controls how client pods are updated when the WEKA version changes. Options include:rolling: The operator automatically updates each client pod sequentially, replacing one pod at a time to maintain availability.
manual: No automatic pod replacements are performed by the operator. Manual deletion of each client pod is required, after which the pod will restart with the updated version. Use
kubectl delete pod <pod-name>
to delete each pod manually.all-at-once: The operator updates all client pods simultaneously, applying the new version cluster-wide in a single step.
To apply the upgrade, update the
weka-in-container
version by:Directly editing the version with
kubectl edit
on thewekaClient
CR.Modifying the client configuration manifest, then reapplying it with
kubectl apply -f <manifest-file>
.
Create a new builder Instance for each WEKA version Rather than updating existing builder instances, create a new instance of the builder with each WEKA kernel version. Each builder must have a unique
wekaContainer
metadata name to support version-specific compatibility.Create a new builder: For each WEKA version, create a new builder instance with an updated
wekaContainer
meta name that corresponds to the new version. This ensures that clients and resources linked to specific kernel versions can continue to operate without conflicts.Cleanup outdated builders: Once the upgrade is validated and previous versions are no longer needed, you can delete outdated builder instances associated with those older versions. This cleanup step optimizes resources but allows you to maintain multiple builder instances if supporting different kernel versions is required.
Best practices
Preloading images
To optimize runtime and minimize delays, preloading images during the reading or preparation phase can significantly reduce waiting time in subsequent steps. Without preloading, some servers may sit idle while images download, leading to further delays when all servers advance to the next step.
Sample DaemonSet configuration for preloading images:
Display custom fields
WEKA Custom Resources enable enhanced observability by marking certain display fields. While kubectl get
displays only a limited set of fields by default, using the -o wide
option or exploring through k9s
allows you to view all fields.
Example command to quickly assess WekaContainer status:
Example output:
This view provides a quick status overview, showing progress and resource allocation at a glance.
Troubleshooting
This section provides guidance for resolving common deployment issues with WEKA Operator.
Pod stuck in pending state
Describe the pod to identify the scheduling issue (using Kubernetes native reporting).
If blocked on weka.io/drives
, see .
If there’s an image pull failure, verify your imagePullSecret
. Each customer should have a unique robot secret for quay.io.
Pod in “wekafsio driver not found” loop
Check the logs for this message and see for further steps.
CSI not functioning
Ensure the nodeSelector
configurations on both the CSI installation and the WekaClient match.
Appendix: Kubernetes Glossary
Last updated