This document provides guidance for deploying AIStore clusters on Kubernetes (K8s).
Generally, any recent version of K8s on a recent Linux OS will be sufficient for AIS. See the prerequisites doc to ensure your cluster is ready.
For network setup details, see the network configuration doc.
-
Ansible Host Config Playbooks To assist you in setting up your system for AIStore, we've included a set of Ansible playbooks for host configuration. For an effective initial setup, we suggest following the
ais_host_config_common guide. This will help you fine-tune your system to meet AIStore's requirements, ensuring optimal performance. -
Persistent Volumes:
- The AIS Operator does NOT format disks or create persistent volumes -- we expect this to be done beforehand as it varies per deployment.
- For details on PV requirements and the PVC naming convention, see Target Data Persistent Volumes.
- See the create-target-pv Helm Chart for a reference template for creating node-local HostPath-type PVs.
Note: Please refer to the compatibility matrix for AIStore and ais-operator. We recommend and only support the latest versions for both.
With Kubernetes installed and the nodes properly configured, it's time to deploy the AIS Operator.
Choose ONE of the following:
- Helm Chart -- Refer to the AIS Helm docs
- Local build (custom builds, development, and testing) -- Refer to the AIS Operator docs
- Default Manifest -- Apply a specific manifest with default values directly from the GitHub release artifact:
export AIS_OPERATOR_VERSION=v2.15.0
kubectl apply -f https://github.com/NVIDIA/ais-k8s/releases/download/$AIS_OPERATOR_VERSION/ais-operator.yamlWait for the operator to come up as ready:
kubectl wait --for=condition=available --timeout=120s deployment/ais-operator-controller-manager -n ais-operator-systemOptionally, use kubectl to check the status of the deployed pods:
$ kubectl get pods -n ais-operator-system
The AIS Operator pod should be in the Running state, indicating a successful deployment.
Once deployed, the AIS Operator will reconcile the state of any deployed AIStore custom resources.
AIS pods schedule onto nodes labeled nvidia.com/ais-proxy=<cluster> and nvidia.com/ais-target=<cluster>, matched by the nodeSelector in the AIS spec.
The same target label is how PV creation discovers which nodes need volumes.
Label the nodes that will host the cluster before deploying, and remove the labels when a cluster is retired so the nodes are free for another one.
See Node Labeling for the convenience script that manages both labels.
With the AIS Operator deployed, the next step is to configure and deploy an AIStore custom resource. Again, there are a few deployment options:
- Helm Charts (recommended) -- See AIS Helm Charts
- Manual resource creation (advanced)
- If you want to manage everything yourself, it is possible to create the required namespace, PVs, secrets, and AIStore custom resource separately.
- The AIS Operator will create all the other K8s resources based on the AIS spec (configmaps, statefulsets, services, pods, etc.).
- Reference the charts for the manifests behind each of these resources, and the storage volumes doc for PV creation guidance.
Multihome Deployment:
- For a multihome deployment using multiple network interfaces, some extra configuration is required before deploying the cluster.
- Refer to the multihome deployment doc for details.
Multiple storage targets can also be deployed on a single K8s node for testing or higher availability.
To deploy with authentication, see the authentication doc.
Specs whose pods violate the baseline Pod Security Standard, for example through host networking or host paths, need the privileged access role.
To run AIS-managed ETL, see ETL access.
After deployment, verify all AIS pods are ready and running:
$ watch kubectl get pods -n <cluster-namespace>
See the operator docs for configuring external access to AIS proxies and targets.
To serve the cluster and AuthN over HTTPS, refer to the TLS guide.
Use the adminClient option in the AIS spec to deploy a managed client Pod pre-configured for the cluster.
See the operator documentation.
For guidance on decommissioning and redeploying an AIS cluster, see the redeployment guide.
To move a proxy and target off a failed or retired node onto a replacement, see the node replacement guide.
AIStore supports a /metrics endpoint to provide prometheus metrics and outputs logs using a sidecar container to K8s standard logging interface. See the AIS docs on metrics and reference metrics.
We also provide Helm charts for configuring our monitoring stack as a starting point or reference: Monitoring Resources.
For evaluating the performance of your AIS cluster, we provide the aisloader load generation tool.
Additionally, aisloader-composer includes a variety of scripts and Ansible playbooks for running aisloader across multiple hosts.
If you encounter any problems during the deployment process, feel free to report them on the AIStore repository's issues page. We welcome your feedback and queries to enhance the deployment experience.
We also provide a troubleshooting doc for steps to resolve some of the issues you might come across.
Happy deploying! 🎉🚀🖥️