Kubernetes is a platform for managing your containers.
Machine learning workflows can often get really messy,
especially in production,
so it was only a matter of time
before somebody put the two together.
How do we do machine learning on Kubernetes
without too much extra work?
Stay tuned to find out.
Welcome to
where we explore the art, science, and tools of machine learning.
My name is Yufeng Guo,
and on this episode we're going to check out Kubeflow,
an open-source project to help make running
machine learning training and prediction on Kubernetes clusters easier.
The Kubeflow project is dedicated to making deployments
of machine learning workflows on Kubernetes simple,
portable, and scalable.
More specifically, it wants to allow you to easily deploy your code
to all sorts of environments-- from, say, your laptop
to a desktop with two GPUs,
or, say, a training Kubernetes cluster versus a production cluster.
And, of course, this wouldn't be Kubernetes
if it didn't allow you to scale everything with demand.
Kubeflow began life
as a way to open source TensorFlow Extended, or TFX,
which was how TensorFlow is run internally at Google.
While it was originally just a simpler way
to run TensorFlow jobs on Kubernetes,
it has since expanded
to become a multi-architecture, multi-cloud framework
for running entire machine learning pipelines
with many contributors, all across the ecosystem.
This might be a good time for a little confession.
I myself, I don't know a whole lot about Kubernetes.
Having spent the past several years focused on TensorFlow
and data science and machine learning,
my Kubernetes skills are... well, they're not exactly top notch.
So I'm really hoping that Kubeflow can allow me to deploy TensorFlow
and other machine workloads onto Kubernetes successfully,
because I do hear Kubernetes is
So, let's see what it looks like to use Kubeflow, shall we?
Kubeflow aims to be able to run anywhere Kubernetes can.
This means everything from your laptop to bare-metal servers
all the way to the public cloud.
For now, let's check out how this works on Google Kubernetes Engine, or GKE.
Installing Kubeflow to GKE is actually shockingly simple,
since there's a click-to-deploy user interface.
All I had to do was enter the project ID of my cloud project,
give my deployment a name,
and choose a zone to put it in.
Then, all the necessary resources were provisioned automatically.
Now
So with Kubeflow installed, and the UI accessible,
you're ready to dive in to the world of Kubeflow.
You can train models, visualize them with TensorBoard,
serve models, build pipelines,
and log in to JupyterHub to manage all these things.
Most of the time we get to use the very same training code
that we would be running locally anyway,
and just add some configuration files
for the Kubeflow-specific parts,
and then you can run them in Kubeflow with no code changes.
I can perform training on my Kubernetes cluster
using Kubeflow,
and have the exported model either stay on disk
in the Kubernetes cluster, or send it off
to a Google Cloud Storage bucket,
allowing me to easily share or deploy the trained model
to systems outside of the cluster.
Alright, that's enough of me talking.
If you're interested in running machine learning pipelines
on Kubernetes,
then it's time for you to get started on Kubeflow.
I've linked to a number of codelabs and resources
in the description down below to help you get started.
Thanks for watching this episode of
and if you enjoyed it, be sure to hit that
and subscribe to get all the latest updates
right when they come out.
For now, head down to the description below
for more information about how to get Kubeflow up and running
on your Kubernetes cluster.
♪ (music) ♪