Building scalable and reproducible ML pipelines on Alibaba Cloud ACK (Kubernetes) enables seamless experimentation, deployment, and monitoring of AI models for data science teams. KitOps, an open-source model packaging and versioning tool, enhances this by standardizing, securing, and automating model workflows with OCI-compliant ModelKits, tightly integrated into CI/CD pipelines and Alibaba Cloud infrastructure.
A robust ML pipeline typically covers:
● Data ingestion and preprocessing
● Model training and evaluation
● Model packaging with KitOps
● Artifact storage in Alibaba Registry
● CI/CD-based testing and deployment
● Serving and monitoring on Kubernetes (ACK)
This comprehensive lifecycle speeds up iteration, improves traceability, and facilitates compliance.
Create an ACK (Alibaba Cloud Kubernetes) cluster using the Web Console or Infrastructure-as-Code tools, configuring your nodes, networking, and access as per Alibaba best practices. Ensure your cluster is ready to accept workloads and that you're set up with the necessary RBAC and ingress rules.
Organize your training code, model weights, and required artifacts. Use the KitOps CLI as follows:
# Initialize your ModelKit manifest
kit init --name text-classifier --framework pytorch
# Add sources, data, and model files
kit add code ./src/
kit add model ./models/model.pt
kit add data ./data/
# Build and push your ModelKit to Alibaba Cloud Container Registry (ACR)
kit build
kit push registry.example.com/text-classifier:0.1.0
This workflow outputs portable, versioned ModelKits ready for Kubernetes deployment.
Automate ModelKit packaging and K8s deployment within your CI/CD pipeline (e.g., GitHub Actions, Alibaba Cloud CloudEffect):
# .github/workflows/deploy.yml
name: Deploy ModelKit to Alibaba ACK
on:
push:
branches: [ main ]
jobs:
build-package-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install KitOps CLI
run: pip install kitops
- name: Build ModelKit
run: kit build
- name: Push to Registry
run: kit push registry.example.com/text-classifier:${{ github.sha }}
This automates model versioning and makes deployments reproducible.
You can deploy your model via Kubernetes using the KitOps init container pattern to pull, unpack, and serve the model:
# k8s/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: text-classifier
spec:
replicas: 1
selector:
matchLabels:
app: text-classifier
template:
metadata:
labels:
app: text-classifier
spec:
volumes:
- name: model-store
emptyDir: {}
initContainers:
- name: kitops-init
image: ghcr.io/kitops-ml/kitops-init:latest
env:
- name: MODELKIT_REF
value: "registry.example.com/text-classifier:0.1.0"
- name: UNPACK_PATH
value: "/model"
- name: UNPACK_FILTER
value: "model,code"
volumeMounts:
- name: model-store
mountPath: /model
containers:
- name: api
image: python:3.9-slim
command: ["/bin/bash"]
args:
- -c
- |
pip install fastapi uvicorn
cd /model/src
python3 app.py
env:
- name: MODEL_PATH
value: "/model/model-root"
ports:
- containerPort: 8000
volumeMounts:
- name: model-store
mountPath: /model
Apply your deployment:
kubectl apply -f k8s/deployment.yaml
Your model is now unpacked by KitOps and served as an API from the deployed pod.
For multi-cluster or continuous delivery, automate application sync with GitOps via ArgoCD on ACK One:
# Enable ArgoCD GitOps on ACK
aliyun adcp UpdateHubClusterFeature --ClusterId <clusterid> --ArgoCDEnabled true
# Check ArgoCD pods
kubectl get pod -n argocd
ArgoCD enables centralized, declarative control and automated CI/CD for your app.
Monitor deployments with Alibaba Cloud CloudMonitor and Log Service; set up quality gates and triggers (e.g., model accuracy, latency, drift detection). Use KitOps and Kubernetes deployment history for simple, rapid rollback if needed.
By combining KitOps and Alibaba Cloud ACK, you achieve a modern, robust ML workflow: models are built, versioned, CI/CD tested, and reproducibly deployed to Kubernetes with minimal manual effort. This approach accelerates AI development, ensures security and reproducibility, and enables seamless scaling from experimentation to production, following DevOps and MLOps best practices.
Disclaimer: The views expressed herein are for reference only and don't necessarily represent the official views of Alibaba Cloud.
From ETL to ELT: Modernising Pipelines for High-Volume Metrics
AI for Customer Retention in Finance: Predicting Churn Before It Happens
Alibaba Clouder - December 28, 2020
Alibaba Cloud Serverless - December 17, 2020
Alibaba Clouder - March 11, 2021
Alibaba Container Service - July 16, 2019
Alibaba Container Service - March 10, 2020
5927941263728530 - May 15, 2025
Best Practices
Follow our step-by-step best practices guides to build your own business case.
Learn More
Platform For AI
A platform that provides enterprise-level data modeling services based on machine learning algorithms to quickly meet your needs for data-driven operations.
Learn More
Epidemic Prediction Solution
This technology can be used to predict the spread of COVID-19 and help decision makers evaluate the impact of various prevention and control measures on the development of the epidemic.
Learn More
Container Service for Kubernetes
Alibaba Cloud Container Service for Kubernetes is a fully managed cloud container management service that supports native Kubernetes and integrates with other Alibaba Cloud products.
Learn MoreMore Posts by Neel_Shah