[MUSIC PLAYING]
MIKE COLEMAN: Organizations today
are looking for ways to streamline
the migration of existing applications to Kubernetes.
In this video, we're going to look at a couple offerings
from Google Cloud that can drastically
reduce the complexity around getting existing workloads
running in Kubernetes--
Migrate for GKE and GKE Autopilot.
Let's start with a brief overview of GKE Autopilot.
Kubernetes is extremely powerful,
but can be a challenge to setup and manage by yourself.
Provisioning and managing resources, security and network
configuration, and scaling can all be challenging.
To help alleviate some of these issues,
Google Cloud has long offered Google Kubernetes Engine
as a managed service.
By using GKE in standard mode, customers still
provision and manage the underlying infrastructure,
but the vast majority of the configuration
is handled by Google.
This is a great solution for customers
who still want to maintain a degree of control--
for example, if they want to use GPU instances.
However, for customers who want to run mainstream workloads
and don't want to worry about configuring infrastructure,
Google Cloud recently introduced GKE Autopilot.
With Autopilot mode clusters, customers
don't have to worry about the underlying infrastructure
at all.
Google Cloud essentially becomes your site reliability engineer,
scaling the cluster up and down as needed.
You simply choose which workloads need to run there,
and Google Cloud does a bunch of the heavy lifting for you.
GKE Autopilot provides several key benefits to customers.
First, optimize production like a Kubernetes expert.
Google creates clusters according
to battle-tested and hardened best practices that
yield optimized configuration and security
posture, ready for production, helping
you reduce GKE learning curve and get to production faster.
Strong security posture.
Google takes full responsibility for nodes and infrastructure
security, eliminating infrastructure security
management tasks.
Reduce day 2 operations.
Google monitors the entire Autopilot cluster-- control
plane, worker nodes, and core Kubernetes system components--
ensuring your pods are always scheduled.
Improve resource efficiency.
Google takes full responsibility for optimizing your resource
consumption.
You pay only for the pods, not for the nodes.
So you have an easy way to run Kubernetes with GKE Autopilot.
How can you easily get existing workloads onto those clusters?
For those of you not familiar with Migrate for GKE,
this solution can be a really useful tool
in your app modernization tool set to accelerate and simplify
your enterprise's application modernization journey to GKE.
You have the option to use Migrate for GKE
as is to accelerate your end-customer modernization
or build your proprietary automations on top
of the product to increase productivity
of your modernization projects.
Either way, it can drastically reduce
the time it takes to move workloads
from VMs into containers.
When looking at migrating an existing workload,
there are four discrete steps that you'll want to go through.
First is discovery and assessment.
Migrate has a fit assessment tool
that can be used to help identify
what workloads you have running and which are the best
candidate for migration.
Look into the fit assessment tool
video for more information.
Next is setup and planning.
Migrated workloads can run on GKE
in standard or Autopilot mode, as well as
on Anthos and even Cloud Run.
Additionally, you can orchestrate migration pipelines
to help automate the migration process.
In this video, we're focused on the third phase,
so I won't spend a lot of time here.
The final phase deals with how you manage applications
after they have been migrated.
Because Migrate for GKE provides you with the resulting
Dockerfile, you can easily manage updates
to your code via your standard deployment pipelines.
Drilling down a bit into the steps
associated with that third phase,
and what you'll see in the upcoming demo,
is the general Migrate for GKE workflow
when it comes to an actual migration.
First, we're going to create a GKE Autopilot cluster.
Then we're going to provide Migrate for GKE a source VM.
The migration processes will inspect the VM
and then generate a migration plan
that we can edit as needed.
From there, it will generate the deployment artifacts,
including a Docker container.
We'll then deploy that container onto our Autopilot cluster.
With that, let's jump into our demo.
We'll start the demo by building out our Autopilot cluster.
Notice that all I need to do is provide
a name for the cluster and the region
in which it's going to run.
And now that our cluster's up and running,
we can move on to deploying our sample application.
OK, so let's deploy the Kubernetes YAML.
And notice that's creating a bunch of services.
And while they're created, Autopilot
is increasing the resource requirements automatically
for us to address those new services.
Now that that's run, let's check our pods.
They're still in Pending.
Let's check them again here a little bit later,
and everything is up and running.
So we can test the service now.
I'm going to get the frontend service IP address.
I'm going to navigate into my web browser.
And you can see here the application is running.
Let me go in.
I'm going to buy an item, and then I'm going to check out.
And you see everything working exactly
as you would expect it to.
The way the application works is every service
except for the payment service is running in Kubernetes.
The payment service is in a VM, and that's
what we're going to migrate.
But first, we need to stop that VM so we can migrate it.
So let's do that now.
To perform the actual migration, I switched over to Migrate
for Containers.
And I'm going to click Create Migration.
I'll give my migration a name.
I'll select a source that I created earlier.
It's a Linux VM.
We'll give it that VM name.
And we're going to migrate the image.
With that, I'll click Create Migration.
And this will go off.
It'll take a little bit of time, so I'll speed up the video,
and I'll rejoin you when it's finished.
Our migration is completed, so what I'm going to do now
is I'm going to come in and I'm going
to review and edit the migration plan that was generated.
What we're going to do first is we're
going to come in and make a change
to this v2kServiceManager variable and set that to true.
That allows us to use the enhanced runtime
to run on GKE Autopilot.
And we're going to change the name of the image
from Payment Service VM to Payment Service,
and the same thing for the Kubernetes service,
since it's no longer running in a VM.
We'll generate our artifacts.
That takes a while, so let me speed up the video here,
and I'll rejoin you when it's complete.
So this process is almost wrapped up.
What we're going to do here is we're going to take a look,
after it finishes, at the artifacts that were generated.
You can see we have a couple of Docker images,
as well as the Dockerfile and some other artifacts.
I'm going to download those into Cloud Shell.
So I'll get-artifacts from my-migration.
If I look in the directory, you can see those artifacts
that I mentioned previously.
Let's apply the deployment spec that was generated.
This is going to deploy our new payment service,
so we'll do a kubectl apply -f deployment_spec.
That's creating the new service and the new deployment
in Kubernetes.
Clear the screen, and let's check
and see the status of those pods.
This might take a few seconds.
All right, let's just wait for those to come up,
and we'll speed up the video.
Now that that is up and running, that new service,
what we're going to do is we're going
to check our app to see if it actually is all working again.
So we'll buy this camera.
Add to cart.
Place order.
And everything is working exactly as expected.
We have migrated the payment service from the VM
into the container.
I hope that demo showed you how easy it
can be to not only deploy a GKE Autopilot cluster,
but also how simple it can be to migrate
an existing VM-based workload to Kubernetes.
For more detailed information, check out
our documentation, as well as the other videos in our Migrate
series.
And don't forget to like and subscribe
to be alerted whenever we publish new content.
[MUSIC PLAYING]