A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/kubernetes-engine/docs/how-to/creating-an-alpha-cluster below:

Creating an alpha cluster | Google Kubernetes Engine (GKE)

This page shows you how to create a Google Kubernetes Engine (GKE) alpha cluster, which is a GKE cluster with Kubernetes alpha APIs and features enabled. With an alpha cluster, all alpha feature gates available with the Kubernetes version are enabled by default. Beta feature gates that Kubernetes enables by default are also enabled. You can modify from GKE defaults which feature gates are enabled. For more information about which feature gates are available with specific versions, and which beta features are enabled by default, see Feature gates for Alpha or Beta features in the Kubernetes documentation.

For more information about how GKE clusters work and how to choose which type of GKE cluster to create, see GKE cluster architecture and About cluster configuration choices.

Before you begin

Before you start, make sure that you have performed the following tasks:

Set up IAM service accounts for GKE

GKE uses IAM service accounts that are attached to your nodes to run system tasks like logging and monitoring. At a minimum, these node service accounts must have the Kubernetes Engine Default Node Service Account (roles/container.defaultNodeServiceAccount) role on your project. By default, GKE uses the Compute Engine default service account, which is automatically created in your project, as the node service account.

Best practice: Instead of using the Compute Engine default service account, create a custom service account for your nodes to use and give it only the permissions that GKE needs to run system tasks. For more information, see Use a least privileged service account.

To grant the roles/container.defaultNodeServiceAccount role to the Compute Engine default service account, complete the following steps:

console
  1. Go to the Welcome page:

    Go to Welcome

  2. In the Project number field, click content_copy Copy to clipboard.
  3. Go to the IAM page:

    Go to IAM

  4. Click person_add Grant access.
  5. In the New principals field, specify the following value:
    PROJECT_NUMBER-compute@developer.gserviceaccount.com
    Replace PROJECT_NUMBER with the project number that you copied.
  6. In the Select a role menu, select the Kubernetes Engine Default Node Service Account role.
  7. Click Save.
gcloud
  1. Find your Google Cloud project number:
    gcloud projects describe PROJECT_ID \
        --format="value(projectNumber)"

    Replace PROJECT_ID with your project ID.

    The output is similar to the following:

    12345678901
    
  2. Grant the roles/container.defaultNodeServiceAccount role to the Compute Engine default service account:
    gcloud projects add-iam-policy-binding PROJECT_ID \
        --member="serviceAccount:PROJECT_NUMBER-compute@developer.gserviceaccount.com" \
        --role="roles/container.defaultNodeServiceAccount"

    Replace PROJECT_NUMBER with the project number from the previous step.

Create an alpha cluster

You can create an alpha cluster by using the Google Cloud console or the gcloud CLI. To create a cluster which specifies the feature gates to enable or disable differently from the default values, use the gcloud CLI.

Console
  1. In the Google Cloud console, go to the Create a Kubernetes cluster page.

    Go to Create a Kubernetes cluster

  2. In the Cluster basics section, complete the following:

    1. Enter the Name for your cluster.
    2. For the Location type, select Zonal, and then select the zone for your cluster.
    3. 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.
    4. From the Release channel drop-down list, select No channel.

      Note: It's not possible to create an alpha cluster enrolled in a release channel, because auto-upgrade cannot be disabled when using release channels, but alpha clusters cannot be upgraded.
    5. Optional: Specify a control plane version from the Version drop-down list.

  3. Optional: Configure other settings for your new cluster.

  4. Optional (available with GKE Enterprise): If you want to register your new cluster to a fleet, go to the Fleet registration section, and follow the Google Cloud console instructions for Create and register a new cluster to complete your cluster registration.

  5. From the navigation pane, under Node Pools, click default-pool.

  6. In the Node pool details section, complete the following:

    1. Enter a Name for the default Node pool.
    2. Optional: Choose the Node version.
    3. Enter the Number of nodes to create in the cluster. You must have available resource quota for the nodes and their resources (such as firewall routes).
    4. Optional: You can choose to disable node auto-upgrades, however we recommend that you review the considerations before disabling node auto-upgrades before choosing this option.
    5. Clear Enable auto-upgrade and Enable auto-repair.
  7. From the navigation pane, under Node Pools, click Nodes.

  8. From the Image type drop-down list, select the node image.

  9. 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.

  10. From the Boot disk type drop-down list, select the disk type.

  11. Enter the Boot disk size.

  12. Optional: From the navigation pane, under Node Pools, click Security.

  13. Optionally, specify a custom IAM service account for your nodes:
    1. In the Advanced settings page, expand the Security section.
    2. In the Service account menu, select your preferred service account.

    We strongly recommend that you specify a minimally-privileged IAM service account that your nodes can use instead of the Compute Engine default service account. To learn how to create a minimally-privileged service account, see Use a least privilege service account.

  14. Caution: You can't modify the service account on an existing node pool after creation.
  15. From the navigation pane, under Cluster, click Features.

  16. Click Enable Kubernetes alpha features in this cluster.

  17. Read and acknowledge the warning by selecting I understand the consequences.

  18. Click Create.

gcloud

Run the following command:

gcloud container clusters create CLUSTER_NAME \
    --enable-kubernetes-alpha \
    --no-enable-autorepair \
    --no-enable-autoupgrade \
    --location CONTROL_PLANE_LOCATION [\
    --alpha-cluster-feature-gates FEATURE_GATES_LIST]

Replace the following:

We strongly recommend that you specify a minimally-privileged IAM service account that your nodes can use instead of the Compute Engine default service account. To learn how to create a minimally-privileged service account, see Use a least privilege service account.

To specify a custom service account in the gcloud CLI, add the following flag to your command:

--service-account=SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com

Replace SERVICE_ACCOUNT_NAME with the name of your minimally-privileged service account.

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 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.
Interact with a cluster using kubectl

After you create a cluster, you need to configure kubectl before you can interact with the cluster from the command line.

Check feature gate state for an alpha cluster

With alpha clusters, you can selectively enable or disable feature gates. For more information, see Feature gates and alpha clusters.

To check the feature gate state for your cluster, see Check feature gate state.

Check when an alpha cluster expires

To check when alpha clusters expire, run the following command:

gcloud container clusters list
Troubleshoot creating an alpha cluster with feature gates

If you attempt to create a cluster with an invalid feature gate, or a feature gate that's unsupported for the Kubernetes version of your cluster, the cluster can be created in an error state.

You can find a message similar to the following in Cloud Logging:

failed to set feature gates from initial flags-based config:
unrecognized feature gate: UNRECOGNIZED_FEATURE_GATE_NAME

If you encounter this error, delete the failed cluster. Check the spelling and compatibility of the feature gates with the given Kubernetes version. Then, try to create the cluster again.

What's next

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4