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
K3scluster (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
.envin the project root directory by filling out variables in.env.example - Set up a
K3sinstance by following this tutorial - Set up
mlflow model registryby following this tutorial - Go to the
K3scontrol 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
K3sandtest-appare ready, you can execute the following commands on the control plane- Create
deploymentbykubectl apply -f kubernetes/deployment-demo.yaml - Create
cluster IPbykubectl apply -f kubernetes/cluster-ip-demo.yaml - Create
node portbykubectl apply -f kubernetes/node-port-demo.yaml - Create
load balancerbykubectl apply -f kubernetes/load-balancer-demo.yaml
- Create
Optionally, you can run test-app in Knative by
- Install
Knativeby following this tutorial - Create
Knativeservice fortest-appbykubectl 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