KASLIN FIELDS: Today, we're going
to explore what it's like to create your first Google
Kubernetes Engine cluster.
In our GKE Essentials Cluster Modes video,
we went over the differences between GKE standard mode
and GKE Autopilot mode clusters.
Now we'll put that knowledge into action
by creating one of each.
I'm Kaslin Fields, and I'm a developer
advocate here at Google Cloud, where
I focus on Google Kubernetes Engine, as well
as the open-source Kubernetes project.
So today, we're going to explore creating your first GKE
cluster.
[MUSIC PLAYING]
We're going to deploy our clusters
today using the Google Cloud Console.
There are many ways to deploy and manage your clusters,
but the Console is a great place to start if you
want to learn what's possible.
From here, we're going to go to the navigation
menu on the upper left and find Kubernetes
Engine in the Compute section.
You could also use the search bar
at the top and search for Kubernetes or Google Kubernetes
Engine.
Now we're in the GKE section of the Console.
Since Autopilot mode is still relatively new,
you can see some information here
about what Autopilot mode is, along with an option
to try a demo, where you will create an Autopilot mode
cluster and deploy a workload into it.
Below that, you'll see any existing GKE clusters,
along with information about them,
such as their Name, Location, Mode, and Resources.
Let's try to create a cluster by clicking on the Create button
at the top of this page.
The Console prompts us by asking whether we
would like to create a Standard mode cluster or an Autopilot
mode cluster, as well as providing
a link to additional information about the differences.
So let's start by creating an Autopilot mode cluster.
On this page, there's some information
about what creating an Autopilot mode cluster will give you,
and there are some input fields where
we will need to specify information about our cluster.
First, we can specify a Name.
Then, what Region we would like to run this cluster in.
Remember, all Autopilot mode GKE clusters are regional clusters,
meaning they're deployed across the zones that
make up a region, so there's no need to specify a zone here.
You could simply hit Create at the bottom of the page
to create the cluster at this point,
but let's take a look at the additional options
that you may wish to configure.
If we scroll down, we can see some expandable sections
for Networking and Advanced Options.
In Networking, if you choose to create a public cluster,
then your nodes will be provisioned
with externally accessible IP addresses
so that you could reach the nodes from anywhere
over the internet.
You can also enable control plane authorized networks
in order to block untrusted, non-GCP source
IPs from accessing the Kubernetes
master through HTTPS.
A private cluster will be one where the nodes are only
accessible via private IPs on Google Cloud's network.
The nodes of a private cluster only
communicate via the private Google Cloud network.
You can configure Cloud Network Address Translation, or Cloud
NAT, for your nodes in order for them
to send outbound requests to the internet.
In Advanced options, if we scroll down here,
you can see configuration options
for the Release channel for your GKE cluster.
When you enroll a new cluster in a release channel,
Google automatically manages the version and upgrade cadence
for that cluster and its node pools.
Your choice of release channel between Rapid, and Regular,
and Stable will affect how quickly
new versions of Kubernetes become
available for your cluster to upgrade
and how often your cluster must upgrade
to stay in compliance with the currently supported versions
of Kubernetes.
So for this cluster, I'm just going
to go with the default, which is the Regular channel.
If you'll need to specify acceptable maintenance windows
for your GKE cluster, you can select Enable maintenance
window here.
You must allow at least 48 hours of maintenance availability
in a 32-day rolling window, and a maintenance window
must allot at least four hours in order to be considered.
These options help you provide optimal availability
of your cluster, while allowing Google
to ensure that your clusters are kept up-to-date with
supported Kubernetes patches and upgrades.
You can also specify Metadata and Labels
in order to keep your cluster resources organized.
The Description field here can be
used to provide a description for this cluster's purpose
or any other information you wish to use to describe it.
For example, I could put in GKEE--
GKE Essentials-- cluster.
Labels can be used to help organize resources
within your project.
For example, you could use labels,
such as prod, dev, or test, to indicate
the use of different clusters.
Or you could specify a team name to indicate
that this cluster is intended for use by that team.
There are many ways that you could
use labels and metadata to keep your Cloud resources organized.
Now at the bottom of this page, we
can use the Create button to create the cluster that we've
configured, or Cancel to exit the page without creating
the cluster.
You can also use the REST or Command Line options here
to get the REST API call or command for use
with the gcloud CLI in order to create this cluster using
the CLI or other automation.
So let's create this cluster now using the Create button here.
So you'll see that our cluster is now creating.
Its status is this currently being
created rolling circle here.
You'll also notice here at the upper right,
you have a notification icon, where
the circle is going, as well.
When our Autopilot mode GKE cluster has finished creating,
we'll receive a notification on this notification icon,
indicating that the cluster is ready.
Now let's go back to Create, where
we will explore configuring a standard mode GKE cluster.
You can see that the format of the page for creating
a standard mode cluster is already a little bit different.
The sections you'll need to go through
to configure your GKE standard mode cluster
are displayed on the left-hand side here.
The center contains the input fields,
where you'll specify your configuration information.
And the right-hand side gives a summary
of the cluster you'll create, including any Cluster
set-up guides used, Immutable properties that you won't
be able to change once the cluster is created, billing
information about the cluster that you're
going to be creating and its resources, any Beta properties
that you'll be using, the Limitations
on the size of the cluster, as well as information
about the Node pools and the actual instances that
will make up your cluster.
So our first tasks, again, are to select
a Name for the cluster and a Zone or a Region.
While Autopilot mode clusters can only be regional,
standard mode clusters may also be
configured to run in only a single zone within a region.
So you can learn more about the differences
between zonal and regional clusters in our documentation.
For this cluster, I'll just make it a Zonal cluster
with the default here.
Again, you'll need to choose a Release channel to determine
the frequency of Kubernetes patches and upgrades.
However, in standard mode, you may also
choose to create a GKE control plane using
a Static version of Kubernetes.
Using a static version will require taking responsibility
for managing your cluster's version
and ensuring the cluster is using a supported version
of Kubernetes.
Now we could stop here and create our cluster,
but let's quickly review the additional configuration
options for a standard mode GKE cluster.
In the Node Pools section over here,
you can configure the number of worker nodes
for your GKE cluster.
You can enable autoscaling, as well as
node auto-upgrade and node auto-repair.
You can also select the Number of nodes for your default node
pool.
In the Nodes section within the default node pool,
we can see more information about the nodes themselves,
such as choosing the machine type, as well as the image--
the operating system that will be configured on those nodes.
In Security, you can configure Service accounts,
Cloud API Access scopes, and Shielded node options.
In the Metadata section here, you
can add labels specifically for the nodes of your cluster,
rather than labels that will be applied
to the cluster as a whole.
You can also specify Kubernetes Node taints
at this stage to help you manage what workloads will be
able to run on this node pool.
Within the Cluster section, you can
configure cluster-level settings pertaining
to Automation, Networking, Security,
Metadata, and additional cluster Features.
So in the Automation section is where
you can configure maintenance windows, as we
did in Autopilot mode, as well.
In the Cluster Networking section,
you can configure public or private clusters,
as we saw in Autopilot mode.
However, standard mode also includes
some additional advanced networking options,
so you might want to take a look at those.
And in security, you can enable shielded or Confidential nodes,
secret encryption, Workload identity,
Google Groups for RBAC, and some Legacy security options here.
In Metadata, you can configure cluster-level Description data
and Labels, as we saw with Autopilot mode.
And in Features, you can configure
additional Google Cloud features,
such as Cloud Run for Anthos, Enabling Cloud
Logging and Monitoring, and additional capabilities,
such as Cloud TPUs, Istio, and more.
Again, at the bottom of this page,
once you've configured all of your options,
you can Create the cluster that you've configured,
you can Cancel, or you can get the REST or gcloud CLI command
to create this cluster.
Now I'll choose to Create and begin creation of this cluster.
The cluster will take several minutes to create,
as Google Cloud is spinning up the compute resources that
configure the cluster--
and configures the cluster according
to your specifications.
You can see that the Autopilot mode cluster is still
working on completing here.
Once it's done, it will be indicated by a checkmark,
as you see here on the existing clusters.
And you may also notice that in an Autopilot mode cluster,
there are no number of nodes indicated.
And for the one that's creating, there's
no VCPU or memory indicated because there
are no workloads running on it.
So when you do have a workload running on it,
it will indicate how many VCPU and memory are being used.
But you won't be able to see the number of nodes,
because in Autopilot mode, the nodes of your Kubernetes
cluster are not accessible and you will not
be able to see them in the console.
And as you can see from the existing Standard Mode
cluster in this project, when the Standard Mode
cluster finishes its creation, you'll see the Number of nodes,
as well as the Total amount of VCPU and memory
that are available to workloads running on that cluster.
There's also a notification here that
indicates that I'm not running enough workloads to be
using this cluster efficiently.
So Autopilot Mode provides a streamlined GKE cluster
creation process with smart defaults,
applying Google's recommended best
practices for high availability and securing
hardening for your cluster.
The pay-per-workload model of GKE Autopilot clusters
may also help increase resource usage efficiency,
and thus optimize costs as you pay only for the resources
you use.
The higher degree of management provided by Autopilot mode
results in a cluster creation process with fewer overall
configuration options--
the goal being to get you to the stage
where you can run your workloads on Kubernetes faster.
Standard mode clusters offer more flexibility and control,
but also require you to think more carefully
about the many considerations that
can go into your GKE Standard Mode cluster's configuration.
Whether Autopilot or Standard Mode, GKE
aims to provide you with the tools
you need to be successful running your applications
on Kubernetes and Google Cloud.
With the concepts discussed in this video,
we're confident you'll be on your way
to building a GKE cluster that suits your needs.
You can get started with GKE by visiting the Google Cloud
Console, as we've explored in this video,
and check out the links below for additional guides
and resources.
And stay tuned for our next videos, where we dive deeper
into GKE topics.
[MUSIC PLAYING]