RUI COSTA: Jonathan, it looks like you're getting
ready for the World Cup.
JONATHAN KOLA: I am actually training for the next one--
2022.
Watch out.
RUI COSTA: A little early, no?
JONATHAN KOLA: Well, you know, I have
to stay ready so that I don't have to get ready.
RUI COSTA: Fair.
Fair.
My name's Rui Costa.
Welcome to another episode of "Take 5."
This is Jonathan.
You want to introduce yourself?
JONATHAN KOLA: Hi, my name is Jonathan Kola.
I'm a Customer Engineer here at Google.
RUI COSTA: Awesome.
What are we demoing today, Jonathan?
JONATHAN KOLA: Today, we're going
to walk through Multi-cluster Ingress with Google Kubernetes
Engine.
RUI COSTA: Very cool.
Let's get started?
JONATHAN KOLA: Yep, let's do it.
[MUSIC PLAYING]
On GCP, the nodes on your Kubernetes cluster
could either all be in one zone, or across multiple zones
in a region.
And on these nodes, you could be running multiple services which
you need to expose to the outside world somehow.
And for this, you would use an Ingress resource.
And on GCP, we implement that using the Google Cloud Load
Balancer.
It allows you to map HTTP requests or particular service
or services running on your nodes.
Now, with Multi-cluster Ingress, it is actually a new feature.
It allows you to route your traffic
across multiple services across multiple nodes.
So it's a really powerful feature, a really cool feature.
So let's jump into the demo.
I'm in my console now, and specifically
in the Google Kubernetes Engine section.
And you can see, I have two clusters here that I've already
provisioned, cluster 1 and cluster 2,
running in US East 4 and Europe West 1.
Diving into one of the clusters, we can take a quick look
at the configuration.
It is a basic default setup, so three nodes
running Kubernetes 1.9.7.
These are essentially the defaults, so nothing too fancy
going on here.
We can also take a look at the workloads
that run on the cluster.
And we see we have two workloads.
These are two deployments running
on the two different clusters.
And they are both called Zone Printer.
If we dive into one of the applications, one
of the deployments, we can take a look at what the UI shows us.
It shows us basic metrics, but what's
going on with those workloads running
on the cluster, or one particular cluster,
in this case.
And we can see by setup that it's just
comprised of three different parts,
all serving the same application.
Now, we've also actually provisioned an Ingress resource
beforehand, which we'll take a look at.
And if you remember, an Ingress resource on Google
is provisioned using the Google Cloud Load
Balancer, which is what we're going to navigate to.
And if we dive into our Google Cloud Load Balancer
implementation, we can actually grab the IP address
that's going to be our [INAUDIBLE] IP
address that we'll actually use to communicate
with the services.
So we can grab that IP address and go to our browser
and redirect ourselves to that address.
And this is what we're greeted with.
We have the US flag and a nice welcome message
from Ashburn, Virginia.
That is the exact place where our cluster is running.
It's in the US East 4 A zone.
Now, what we want to do next is simulate
what would happen if one of our clusters,
or the applications running on those clusters, falls over.
Underneath the hood, GKE clusters
are actually Managed Instance groups.
So we can navigate to the Managed Instance group page
and actually simulate what this kind of scenario
would look like.
So if we set Restart Event to actually restart
all of the nodes, this will kill what's running right now.
The nodes will be drained.
And that cluster, for a brief period, will be unavailable.
So we've done that.
Hopefully, in a few seconds, we will have our cluster coming
offline, but soon to be restarted.
So let's navigate back to the browser
and see what actually happens now.
And after a few seconds, success.
We've been redirected to the Belgium zone.
That's Europe West 1, where our second cluster is running
with the same application.
So this is pretty cool.
In a normal scenario, wherever your users
are trying to access the application from,
they would actually be routed to the zone that's
closest to them.
This is a powerful Multi-cluster Ingress.
So what do you think, Rui?
RUI COSTA: That was amazing, Jonathan.
Thank you.
JONATHAN KOLA: Thank you.
RUI COSTA: Thanks, everyone, for watching.
Remember to click the Subscribe and Share Video.
JONATHAN KOLA: And if you are working on any cool projects
and you want to connect with us, click on the link
in the description below.
RUI COSTA: Thanks, everyone.
JONATHAN KOLA: Thank you.
[MUSIC PLAYING]