>> Hey friends, I'm Scott Hanselman
and it's another episode of Azure Friday.
I'm here with Ria Bhatia, she is
a Program Manager on Azure Compute. How are you?
>> Good. How are you?
>> I'm very well because you're a Kubernetes expert
and I know nothing about Kubernetes.
I've been learning. I built a Raspberry Pi cluster.
I'm built to make KS and you work on that stuff.
And you've got something cool to share with me.
>> I do. So, I'm here to
talk about our newest community project
called Virtual Kubelet.
So, we've actually created
this project and released it
within the Kubernetes community itself.
And basically, what it does
is it creates a virtual node in
your Kubernetes cluster and then you're
able to deploy out pods to it
but into a different service.
So that might sound a little bit confusing, so.
>> It's a little inceptiony.
>> Yeah. It's basically a node within a node,
because it actually gets deployed out
as a pod within your cluster,
but that's just the way it works.
The way that a customer or you would use it
is that if you want to get on the unlimited scale,
the per second billing or
the really fast start of
times of Azure Container Instances,
then by installing Virtual Kubelet
into your cluster, you're able to do that.
So, you're able to spin out
Container Instances onto your cluster and
it actually gets spun out
into a completely different service.
And so you don't manage that which is pretty awesome.
So we take away basically
the underlying VM infrastructure completely.
So that operational hardship of having to
manage your agent nodes goes away.
>> Okay. So, let's try to bring this
back down to my level.
>> Yeah.
>> And then we'll work up to your level.
>> Awesome.
>> Okay. So, Kubernetes manages N number of nodes, right?
And within those nodes are these kubelets and
the kubelets have collections of their pods,
which are collections of containers?
>> Yeah.
>> Okay.
>> So, the kubelets basically just manage
the pods and containers on that node.
>> Okay. And when I take like an ASP.
net core application, I put it in a container,
I put it in my registry,
I deploy it into Kubernetes and then is deployed
onto a virtual machine somewhere that's managed by AKS,
and I can see that virtual machine, right.
I can look at it and say that, "It's that one."
So, I have a layer
of abstraction where I'm thinking about my application,
but it's pretty low-level though.
I can still see that Kubernetes is doing stuff.
Do I have per second billing at that point?
>> No. So right now, you don't.
So in your scenario,
that's just the normal AKS scenario.
>> Right.
>> For example, in our scenario with Virtual Kubelet,
you don't see any of the nodes,
those nodes in your cluster,
that's completely taken away.
>> I like that.
>> And you're able to just directly spin out pods to
it and we've created the abstraction
where you do see a virtual node.
Just so it's easy for you,
so you don't have to learn anything new.
>> Okay. So that if I'm understanding correctly,
Virtual Kubelet is a stand
in for the kubelet that I was just talking about.
And then proxys off to a service that's
much higher level that has
all of the features that you just described.
>> Yeah, exactly.
>> It sounds like something I want.
>> Yeah. Awesome.
>> Cool.
>> So, what I'm going to do today is actually
deploy an entire application
and show you guys how it works.
>> Let's do it.
>> So, Azure's implementation
of Virtual Kubelet is called
the ACI Connector and we've made it easy
to actually install
the connector through the command line.
So it's an easy install connector command.
You need to throw in the name of your AKS cluster.
So, you need to have an AKS cluster already
deployed on to here.
Then you throw in the resource group of that AKS cluster.
And then, you get to decide on a connector name.
So, I'm just going to call it
"myaciconnector" and this is where the fun part comes.
>> Okay.
>> So with this implementation,
you can actually have
both a Linux and a Windows connector.
So what that allows you to do
is that in your cluster,
you can have a Windows virtual node
and a Linux virtual node,
and then you can spin out your Windows workloads to
one node, and your Linux to another.
And you're managing it from the same cluster.
>> But my Kubernetes cluster doesn't know or care.
>> No.
>> It just handle. So then I could
have ASP.net core on Linux, ASP.
net on Windows, Reddit on Linux, and mix and match.
>> Exactly, yeah.
>> Very cool.
>> Offering the same cluster.
So it's already deployed,
we're basically using home in
the background to wrap
up the command which is pretty great.
So, I'm going to go ahead and get nodes
and we're going to see something different.
So, these are my two AKS nodes right here,
but these are my two virtual nodes.
So those have just come up.
If I get pods,
so you guys know what's happening in the background,
they're actually just deployed as pods.
So that's why I have two pods running
but we're faking out
this kubelet interface in Kurbenetes.
So let's go ahead and actually install this demo, so.
>> And after you do that,
I want to ask a question about
those get pods, those get nodes.
Okay. So then you're firing off-
>> Yeah. So, I can explain what I've just done here.
So, I basically just deployed
an entire facial recognition application.
So what it has is a back end
so this will simulate kind of
an application that you would have running.
So at the back end,
at the front end, and I also have a worker pod.
So the back end is basically
picking up pictures from my Azure Blob Storage,
it's finding a bunch of pictures,
and my worker pods going in,
and it's sorting the ones with faces
and sorting the ones without faces.
So, I only have one worker pods,
it's going to be super slow.
>> Okay.
>> So we're going to, once it starts up,
we'll talk more about that.
>> Okay. So right now, this is the deployment process.
It's going to create the containers, deploy
everything. So those take a couple of minutes.
>> Yeah.
>> Okay. If you would mind scrolling up
just a little bit.
>> Yeah.
>> I noticed something interesting when
you said get nodes,
you've got a couple that are,
the two top ones are two months old.
The bottom ones are seconds old.
I noticed the versions are different.
The Virtual Kubelet, is it really
a version of Kubernetes or are you lying to Kubernetes?
>> So, yeah. This is the interesting part.
So this is a super new experimental kind of project.
Some people are starting to do POCs with it
but the reason this is different
is because we're running off of,
we're saying that 1.8.3
is what our implementation is run of off.
So, we've tested those capabilities with
Virtual Kubelet and we know it works with that version.
Right now, we're also pushing out bug fixes.
So like, that version is kind of
consistent and the feature will continue to ramp it up.
So we'll test it against every
Kubernetes version and ramp it up,
but it's totally normal and totally
fine if there are two different versions up there.
>> And the Virtual Kubelet is
pretending to be a kubelet from Kubernetes.
Kubernetes is going to ask it questions about itself,
about its operating system, about
its memory and all those kind of things.
And it has to then lie or does it have to then
proxy those two ACI or a little of both?
>> Yeah. So it's a little bit of both right now.
Currently, we are just passing through
values for like a node condition for example,
we don't actually have nodes here.
So there's no node condition.
So things like that we are just passing through.
In the future, we plan to actually have
more of a standard way
of how we pass this through cause there is,
the concept of having multiple providers.
So other Clouds, other people can basically
create other providers and that's why we
created Virtual Kubelet to basically make a standard and
conform across the entire industry
on what a Virtual Kubelet means.
So, this is kind of beyond just Microsoft and
that's why we've gone within
the Kubernetes community to be like, "Hey,
let's work together to figure out what this means."
So it could mean something different in the future.
>> Interesting.
Maybe you can expand on that a little bit.
So you have an ACI Connector
which allows the Virtual Kubelet to then proxy
creation of things off into
another world of per second billing.
Are you saying it could proxy stuff off
to another company, another Cloud?
>> It could.
>> Entirely.
>> Yeah, it could.
So, this is a good place to go to our actual repo.
So this is our Virtual Kubelet repo.
So if you guys want to see any of
our read me's or figure out how to install a connector,
it's not on Azure docs yet,
but it is on this repo.
So, the first read me.
This is the development version.
So, if you want to create your own provider,
you can and you would go here.
But if you want to see the different implementations that
have been merged into Virtual Kubelet,
you can see them right here.
So, Hyper is another one.
They that also have this ACI like service of
containers as a service platform.
So, you can spin out into Hyper if you want,
and you can also spin out into Azure,
which is what we're talking about today.
>> It might be totally nuts to say this,
but could I have an AKS that's running in Azure,
and a couple of kubelets that are running in ACI,
and in the same spile, one in Hyper.
>> Yeah.
>> And going over VPN or going over the open Internet.
>> Yeah.
>> So, even though it's high latency, it would just know.
It would still be a kubelet.
>> Yeah. Exactly. You can have multiple connectors.
>> I don't know like, why I would want to do that.
>> Yeah, I don't know why.
>> I think that's cool.
>> It is, yeah. A lot of people are
thinking of these different things and
the different configurations o.. Yeah, it's super cool.
We don't know why yet, but
you could have a cluster
and you could play around with it,
where you spin out to multiple riders,
multiple regions, multiple configurations of pods,
like you can really do whatever you
want with these nodes.
>> So this really is an example of,
we think that this is a problem,
we think this is a good solution,
and what do you all think,
and you're putting at the command. So
this isn't a guarantee that this is going to be
a product. It's an experiment.
>> Yeah, it is an experiment right now.
We are working within Azure itself to make sure it's
a first class solution within AKS.
So in the future, it will be more in
wrapped into AKS and there will
be more of a streamlined solution.
As you can see, this is just kind of been put together.
We released in December.
So, we're working on AKS and ACI
and soon, this will
become more of a polish experience for everyone.
>> Okay. So, from an AKS talking to ACI,
that is going to be a real thing polished,
and official and supported.
And then whether it takes fire in the community,
really comes up to whether or not
people want to get involved and help out.
>> Exactly.
>> So, the thing that
you fired off, has it come up by now?
>> Yeah. Let's see. Let's check it out.
All right. So yeah, it started to process.
As we can see, it's just streamlined now.
So we're at about 0.2 pods per second,
still pretty slow, which is why we finally have one pod.
So, what I'm going to do is
go ahead and scale this.
So I'm going to scale within Kubernetes itself.
You don't have to learn anything new to do this.
Just how you would scale before.
I'm going to scale my ACI deployment
and then I'm going to say that I want 10 of them.
So, wha this is going to do is it's going
to create a bunch of pods within ACI.
We're not going to see it in my cluster,
but we are going to see it in
the context that I can manage it from my cluster.
>> Does that mean that when you say get pods,
it's still going to see just one?
>> No. Sorry, that was confusing.
It's going to see all my pods
but they're not actually physically in my cluster.
So one virtual kubelet now is going to become 10?
There is one virtual kubelet.
>> Yeah.
>> And it'll spin out multiple pods.
>> Within that one kubelet?
>> Yeah.
>> Okay. It's something I can visualize
within kube-patrol?
>> Yes. So let's get pods. Oh, let's do, sorry.
>> Thanks for your patience with my-
>> Oh, yeah. No, that's totally, totally fine.
Every one has these questions, so-
>> Right. It's a little hard, I think,
for people that are getting started with Kubernetes,
nodes and pods and kubelets.
>> It's a lot. It is a lot. Yeah, you need a node
and then to deploy workloads to it, you need
pods on top of those nodes.
So the node is like the simplified compute that you need
and that's what we're trying to
take away from the scenario.
We don't want you to think about nodes
if you're already creating applications or containers.
>> So nodes contain kubelets but is it contains or it's a-
>> Nodes have kubelets running on them, yes.
>> Okay. Nodes have kubelets. So here's 10 now
and you're seeing this from get pods-
>> Yeah, this is get pods. So what we've done is
we've actually created all these new pods.
So before, when we deployed,
we just had these three running.
>> Right, right.
>> And these are running in my cluster.
As you can see, it's on this node
but if we go down, we can see that
they're actually now on the Virtual Kubelet node.
So the ACIs, ACI Instances have basically been
deployed out into my virtual node.
So they're on a different node now.
>> Because you're virtualizing this, do I have to
think about latency or networks or how much overhead
is there in this-
>> How much actual overhead? Right now,
we haven't really got into the specifics.
Hopefully, you won't have to think about anything,
that's the point. So everything's going to be wrapped
into that.
>> So from a product perspective, at some point,
it'll be a check box and you'll do the smart networking,
and it'll all be in the same VMs?
>> Yeah, exactly.
>> Okay. So you just scaled out to 10,
you were at 0.2 second before.
Yeah. I scaled it out to 10. So I'm going to show you guys
what, oh, so it's already starting to process.
>> Oh, wow.
>> So what we're getting is a spike.
Yeah, it's actually faster than how we-
when we deploy the entire application, it takes
a little bit longer. So it has so many parts to it
but scaling it out, it's probably one of the fastest way
is to scale out in the Cloud right now, which is pretty
awesome. It scales super fast.
>> So once it's warmed up and it's running,
scaling up and scaling down, and I get you in set up,
I assume, my own autoscaling like I could do it based on
how much is in the queue and then when it's done-
>> You can use Kubernetes Autoscaler with this.
Put the right events that you want to trigger, a scale,
and you're golden.
>> So between Kubernetes Autoscaler, Virtual Kubelets
and ACI, it sounds like if I was really, let's just say,
uptight about spending as little money as possible,
this is going to be an opportunity for me to get
all the way down to per second billing, to have
Kubernetes managed for me, sounds like
a great project.
>> It's the future of Kubernetes, hopefully and the
future of what Azure is creating for Kubernetes.
>> Show me the GitHub page and we'll make sure that
we send folks to it.
>> Yeah. So this is the page right here,
and I'm also going to show you guys the dashboard
so you can see what happens within
your Azure Dashboard. But if you want to create the
connector from scratch, you can go ahead and do that.
We give you, literally, two- like it's super detailed
which is awesome. The best part about being an
open source is that so many people contribute to this.
So we have that, we also have just the quick set up
which is what I did. So right here, so in the Windows,
Linux, whatever you want to do.
So that's all in there.
So if I go to the dashboard and go to my resource group
in here, you'll see that I just have these two clusters
running, and we're running off of this AKS cluster,
and then I have all of my ACI Container Instances.
So this is what the connector command will do for you.
It'll wrap up everything in the same resource group
because that's what we've specified and then,
it's a different compute service so that's why they
show up right here.
>> All right. Very cool. So we can check this out at
github.com/virtual-kubelet and get involved.
Pull requests are appreciated.
Yeah. Get involved and even if you're just using it,
and you're a customer, go ahead and go into the issues.
And if you find something wrong, just go and say,
"Hey, I want this." Or "This doesn't work," and we're
quick to respond. So even if you're not contributing to
the actual project itself, we love the feedback, we love
the input. Everything's done from the open source
community. We also have a weekly Virtual Kubelet meeting
so if you are interested in our architecture, we do talk
in sig-node once in a while but we also weekly meet on-
and we do some in-person meetings and things like that so
if you want to be involved, please reach out on the
Kubernetes Live channel.
>> All right. I am learning all about Kubernetes and
Virtual Kubelet here on Azure Friday.