This page shows you how to create a Google Kubernetes Engine (GKE) alpha cluster, which is a cluster with Kubernetes alpha features enabled in GKE. You can also read more about the types of clusters and about cluster architecture.
Before you begin
Before you start, make sure you have performed the following tasks:
- Ensure that you have enabled the Google Kubernetes Engine API. Enable Google Kubernetes Engine API
- Ensure that you have installed the Google Cloud CLI.
- Set up default Google Cloud CLI settings for your project by using one of the following methods:
gcloud init, if you want to be walked through setting project defaults.
gcloud config, to individually set your project ID, zone, and region.
gcloud initand follow the directions:
If you are using SSH on a remote server, use the
--console-onlyflag to prevent the command from launching a browser:
gcloud init --console-only
- Follow the instructions to authorize the gcloud CLI to use your Google Cloud account.
- Create a new configuration or select an existing one.
- Choose a Google Cloud project.
- Choose a default Compute Engine zone.
- Choose a default Compute Engine region.
- Set your default project ID:
gcloud config set project PROJECT_ID
- Set your default Compute Engine region (for example,
gcloud config set compute/region COMPUTE_REGION
- Set your default Compute Engine zone (for example,
gcloud config set compute/zone COMPUTE_ZONE
gcloudto the latest version:
gcloud components update
By setting default locations, you can avoid errors in gcloud CLI like the
One of [--zone, --region] must be supplied: Please specify location.
- Ensure you have the correct permission to create clusters. At minimum, you should be a Kubernetes Engine Cluster Admin.
- Be sure you understand the limitations of alpha clusters.
Create an alpha cluster
You can create an alpha cluster by using the gcloud CLI or the Google Cloud console.
Run the following command:
gcloud container clusters create CLUSTER_NAME \ --enable-kubernetes-alpha \ --no-enable-autorepair \ --no-enable-autoupgrade \ --region COMPUTE_REGION
Replace the following:
CLUSTER_NAME: the name you choose for the cluster.
COMPUTE_REGION: the Compute Engine region for the cluster. For zonal clusters, use the
You can optionally use the
flag to specify a different IAM service account that nodes
in your cluster's first node pool uses instead of the Compute Engine
default service account. This flag is optional, but we strongly recommend
that you create and use a minimally-privileged service account
so that your nodes don't have more privileges that they require.
You are prompted to acknowledge a warning that the alpha cluster is not upgraded and is deleted after 30 days:
This will create a cluster with all Kubernetes Alpha features enabled. - This cluster will not be covered by the GKE SLA and should not be used for production workloads. - You will not be able to upgrade the master or nodes. - The cluster will be deleted after 30 days.
Go to the Google Kubernetes Engine page in the Cloud console.
Click add_box Create.
In the Cluster basics section, complete the following:
- Enter the Name for your cluster.
- For the Location type, select Zonal, and then select the desired zone for your cluster.
- If you are creating a multi-zonal cluster, select the Specify default node locations checkbox, and then choose additional zones in which you'd like the node pools to run.
For the Control plane version, select Static version, then choose a GKE version.
From the navigation pane, under Node Pools, click default-pool.
In the Node pool details section, complete the following:
From the navigation pane, under Node Pools, click Nodes.
From the Image type drop-down list, select the desired node image.
Choose the default Machine configuration to use for the instances. Each machine type is billed differently. The default machine type is
e2-medium. For machine type pricing information, refer to the machine type price sheet.
From the Boot disk type drop-down list, select the desired disk type.
Enter the Boot disk size.
Optional: From the navigation pane, under Node Pools, click Security.
Optional: From the Service account drop-down list, select an Identity and Access Management (IAM) service account for your applications to use when calling Google Cloud APIs. We recommend that you use a minimally privileged service account instead of using the default service account, so that your nodes don't have more privileges that they require.
From the navigation pane, under Cluster, click Features.
Click Enable Kubernetes alpha features in this cluster.
Read and acknowledge the warning by selecting I understand the consequences.
After you create a cluster, you need to
before you can interact with the cluster from the command line.
Check when an alpha cluster expires
To check when alpha clusters expire, run the following command:
gcloud container clusters list
- Learn more about the types of clusters you can create.
- Learn about managing your clusters.
- Learn how to delete clusters.