This is a repository for my talk, Gentle introduction to scaling up ML service with Kubernetes + Mlflow
, at PyData NYC 2022.
- The slides for my talk (link)
- How to set up a 3-node
K3s
cluster (link) - How to set up
Knative Serving
(link) - How to set up
mlflow model registry
(link) - Code for
test-app
(link)
I recommend you to install the followings before you run this repo
make
(Linux tool)curl
(Linux tool)- python virtual environment such as
conda
- Create
.env
in the project root directory by filling out variables in.env.example
- Set up a
K3s
instance by following this tutorial - Set up
mlflow model registry
by following this tutorial - Go to the
K3s
control plane node, and runmake namespaces && make secrets
. This sets up an environment for this demo inK3s
. Make sure you follow the first step before you run this - Once
K3s
andtest-app
are ready, you can execute the following commands on the control plane- Create
deployment
bykubectl apply -f kubernetes/deployment-demo.yaml
- Create
cluster IP
bykubectl apply -f kubernetes/cluster-ip-demo.yaml
- Create
node port
bykubectl apply -f kubernetes/node-port-demo.yaml
- Create
load balancer
bykubectl apply -f kubernetes/load-balancer-demo.yaml
- Create
Optionally, you can run test-app
in Knative
by
- Install
Knative
by following this tutorial - Create
Knative
service fortest-app
bykubectl apply -f kubernetes/knative-demo.yaml
Once everything is done, clean all components you created for this demo by running make clean
on the K3s
control plane node. For more information, run make help