A RetroSearch Logo

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

Search Query:

Showing content from https://cloud.google.com/distributed-cloud/edge/latest/docs/clusters below:

Create and manage clusters | Distributed Cloud connected

This page describes how to create and manage Google Distributed Cloud connected cluster resources. Starting with release 1.7.0, Google Distributed Cloud connected no longer supports Cloud control plane clusters.

For more information about Distributed Cloud connected clusters, see How Distributed Cloud connected works.

Note: The Google Cloud CLI instructions on this page assume that you are using Cloud Shell or another environment with bash installed. Prerequisites

Before you can create a Distributed Cloud connected cluster, you must enable the required APIs in the target Google Cloud project. To do so, you must have one of the following roles in the Google Cloud project:

For more information about these roles, see Basic roles. For information about granting roles, see Grant a single role.

To create a Distributed Cloud connected cluster, enable the following APIs:

For information about enabling APIs, see Enabling services.

When you create a Distributed Cloud connected cluster, the following rules apply:

Recommended topics

Before creating a cluster, also familiarize yourself with the following topics:

Create a cluster

To create a Distributed Cloud connected cluster, complete the steps in this section. Creating a cluster is one of multiple steps required to deploy a workload on Distributed Cloud connected.

To complete this task, you must have the Edge Container Admin role (roles/edgecontainer.admin) in your Google Cloud project.

Console
  1. In the Google Cloud console, go to the Kubernetes Clusters page.

    Go to Clusters

  2. Click Create.

  3. On the Create a cluster page, click the On-premises tab.

  4. Next to the Distributed Cloud Edge option, click Configure.

  5. On the Cluster basics page, provide the following information:

  6. In the left navigation, click Control plane.

  7. On the Control plane page, provide the following information:

  8. In the left navigation, click Networking.

  9. On the Networking page, provide the following information:

    For more information, see Distributed Cloud Pod and Service network address allocation.

  10. In the left navigation, click Authorization.

  11. On the Authorization page, provide the name of the user account within the target Google Cloud project that is authorized to modify cluster resources.

  12. Assign a node pool to the cluster by doing one of the following:

  13. To create the Distributed Cloud connected cluster, click Create.

gcloud

Use the gcloud edge-cloud container clusters create command:

gcloud edge-cloud container clusters create CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --fleet-project=FLEET_PROJECT_ID \
    --cluster-ipv4-cidr=CLUSTER_IPV4_CIDR_BLOCK \
    --cluster-ipv6-cidr=CLUSTER_IPV6_CIDR_BLOCK \
    --services-ipv4-cidr=SERVICE_IPV4_CIDR_BLOCK \
    --services-ipv6-cidr=SERVICE_IPV6_CIDR_BLOCK \
    --default-max-pods-per-node=MAX_PODS_PER_NODE \
    --release-channel RELEASE_CHANNEL \
    --control-plane-node-storage-schema CONTROL_PLANE_STORAGE_SCHEMA \
    --control-plane-kms-key=CONTROL_PLANE_KMS_KEY \
    --control-plane-node-location=CONTROL_PLANE_LOCATION \
    --control-plane-node-count=CONTROL_PLANE_NODE_COUNT \
    --control-plane-machine-filter=CONTROL_PLANE_NODE_FILTER \
    --control-plane-shared-deployment-policy=CONTROL_PLANE_NODE_SHARING \
    --external-lb-address-pools=IPV4/IPV6_DATA_PLANE_ADDRESSES \
    --version SOFTWARE_VERSION \
    --offline-reboot-ttl REBOOT_TIMEOUT

 

Replace the following:

API

Make a POST request to the projects.locations.clusters method:

POST /v1/projects/PROJECT_ID/locations/REGION/clusters?clusterId=CLUSTER_ID&requestId=REQUEST_ID&fleetId=FLEET_PROJECT_ID

{
  "labels": { LABELS,
  },
  "authorization": {
    "adminUsers": {
      "username": "USERNAME"
    }
  },
  "fleet": {
    "project": "FLEET_PROJECT_ID"
  },
  "networking": {
    "clusterIpv4CidrBlocks": CLUSTER_IPV4_CIDR_BLOCK,
    "servicesIpv4CidrBlocks": SERVICE_IPV4_CIDR_BLOCK,
    "clusterIpv6CidrBlocks": CLUSTER_IPV6_CIDR_BLOCK,
    "servicesIpv6CidrBlocks": SERVICE_IPV6_CIDR_BLOCK,
      },
  "defaultMaxPodsPerNode": MAX_PODS_PER_NODE,
  "releaseChannel": "RELEASE_CHANNEL",
  "controlPlaneEncryption": {
   "kmsKey": CONTROL_PLANE_KMS_KEY,
  },
  "controlPlane": {
    "local": {
      "nodeLocation": "CONTROL_PLANE_LOCATION",
      "nodeCount": CONTROL_PLANE_NODE_COUNT,
      "machineFilter": "CONTROL_PLANE_NODE_FILTER",
      "sharedDeploymentPolicy": "CONTROL_PLANE_NODE_SHARING"
    }
  },
  "externalLoadBalancerIpAddressPools": [
    "IPV4/IPV6_DATA_PLANE_ADDRESSES"
  ],
  "targetVersion": "SOFTWARE_VERSION",
  "offlineRebootTtl": "REBOOT_TIMEOUT",
}

Replace the following:

List clusters in a region

To list the Distributed Cloud connected clusters provisioned in a Google Cloud region, complete the steps in this section.

To complete this task, you must have the Edge Container Viewer role (roles/edgecontainer.viewer) in your Google Cloud project.

Console
  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Examine the list of clusters.

gcloud

Use the gcloud edge-cloud container clusters list command:

gcloud edge-cloud container clusters list \
    --project=PROJECT_ID \
    --location=REGION

Replace the following:

API

Make a GET request to the projects.locations.clusters.list method:

GET /v1/projects/PROJECT_ID/locations/REGION/clusters?clusterId=CLUSTER_ID&filter=FILTER&pageSize=PAGE_SIZE&orderBy=SORT_BY&pageToken=PAGE_TOKEN

Replace the following:

Get information about a cluster

To get information about a Distributed Cloud connected cluster, complete the steps in this section.

To complete this task, you must have the Edge Container Viewer role (roles/edgecontainer.viewer) in your Google Cloud project.

Console
  1. In the Google Cloud console, go to the Clusters page.

    Go to Clusters

  2. Select the desired cluster.

    A fold-out panel with detailed information about the cluster appears in the right pane.

gcloud

Use the gcloud edge-cloud container clusters describe command:

gcloud edge-cloud container clusters describe CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION

Replace the following:

API

Make a GET request to the projects.locations.clusters.get method:

GET /v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID

Replace the following:

Get the available software versions for a cluster

To find out which Distributed Cloud connected software versions are available on your Distributed Cloud connected zone to create clusters, complete the steps in this section.

To complete this task, you must have the Edge Container Viewer role (roles/edgecontainer.viewer) in your Google Cloud project.

gcloud

Use the gcloud edge-cloud container get-server-config command:

gcloud edge-cloud container get-server-config --location=REGION

Replace REGION: with the Google Cloud region in which you created your Distributed Cloud connected zone.

API

Make a GET request to the projects.locations.serverConfig method:

GET /v1/projects/PROJECT_ID/locations/REGION/serverConfig

Replace the following:

Upgrade the software version of a cluster

To upgrade the software version of a Distributed Cloud connected cluster, complete the steps in this section.

Specify software upgrade stage size

Preview

This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions.

Before completing the steps in this section, see Software update staggering.

To specify the number of nodes that can go down for software upgrades simultaneously, use the following command:

 gcloud edge-cloud container clusters update CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --max-unavailable-worker-nodes=MAX_UNAVAILABLE_NODES
    

Replace the following:

To reset this value back to default, use the following command:

 gcloud edge-cloud container clusters update CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --clear-max-unavailable-worker-nodes
    

Replace the following:

Upgrade a cluster to a newer version of Distributed Cloud connected software

To complete this task, you must have the Edge Container Admin role (roles/edgecontainer.admin) in your Google Cloud project.

gcloud

Use the gcloud edge-cloud container clusters upgrade command:

gcloud edge-cloud container clusters upgrade CLUSTER_ID \
   --location=REGION \
   --project=PROJECT_ID \
   --schedule=UPGRADE_SCHEDULE \
   --version=SOFTWARE_VERSION

Replace the following:

API

Make a POST request to the projects.locations.clusters.upgrade method:

POST /v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID:upgrade?requestId=REQUEST_ID
{
  "name": "projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID",
  "targetVersion": "SOFTWARE_VERSION",
    "schedule": "UPGRADE_SCHEDULE",
}

Replace the following:

A software upgrade typically takes about 2 hours per each node that's part of the cluster's node pool. The command returns an operation that lets you track the progress of the software upgrade. While the software upgrade is in progress, the status of the cluster is set to Reconciling and returns to Running once the upgrade completes. A cluster status of Error indicates the software upgrade failed. In such cases, run the upgrade process again. See Get information about a cluster for information about checking the cluster's status.

Modify a cluster

To modify a Distributed Cloud connected cluster, complete the steps in this section. If you are modifying the storage encryption configuration for the cluster, you cannot update any other parameters in the same update operation.

To complete this task, you must have the Edge Container Admin role (roles/edgecontainer.admin) in your Google Cloud project.

gcloud

Use the gcloud edge-cloud container clusters update command:

gcloud edge-cloud container clusters update CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --cluster-ipv4-cidr=CLUSTER_IPV4_CIDR_BLOCK \
    --services-ipv4-cidr=SERVICES_IPV4_CIDR_BLOCK \
    --default-max-pods-per-node=MAX_PODS_PER_NODE \
    --release-channel=RELEASE_CHANNEL \
    --control-plane-kms-key=CONTROL_PLANE_KMS_KEY \
    --offline-reboot-ttl=REBOOT_TIMEOUT \
    --max-unavailable-worker-nodes=MAX_UNAVAILABLE_NODES

Replace the following:

API

Make a PATCH request to the projects.locations.clusters.patch method:

PATCH /v1/projects/PROJECT_ID/locations/REGION/clusters/?updateMask=UPDATE_MASK&requestId=REQUEST_ID
{
 "labels": { LABELS,
  },
  "networking": {
   "ClusterIpv4CidrBlocks": CLUSTER_IPV4_CIDR_BLOCK,
   "servicesIpv4CidrBlocks": SERVICE_IPV4_CIDR_BLOCK,
   "ClusterIpv6CidrBlocks": CLUSTER_IPV6_CIDR_BLOCK,
   "servicesIpv6CidrBlocks": SERVICE_IPV6_CIDR_BLOCK,
   },
  "authorization": {
    "adminUsers": {
       "username": USERNAME
    }
  },
  "defaultMaxPodsPerNode": MAX_PODS_PER_NODE,
  "releaseChannel": RELEASE_CHANNEL,
  "controlPlaneEncryption": {
   "kmsKey": CONTROL_PLANE_KMS_KEY,
  },
  "offlineRebootTtl": "REBOOT_TIMEOUT",
  }

Replace the following:

Obtain credentials for a cluster

To obtain credentials for a Distributed Cloud connected cluster, complete the steps in this section.

To complete this task, you must have the Edge Container Viewer role (roles/edgecontainer.viewer) in your Google Cloud project.

gcloud

Use the gcloud edge-cloud container clusters get-credentials command:

gcloud edge-cloud container clusters get-credentials CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --offline-credential

Replace the following:

To generate an offline credential for the cluster, specify the --offline-credential flag.

API

Make a GET request to the projects.locations.clusters method:

GET /v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID

Replace the following:

{ % comment % }

Obtain cluster credentials through Connect gateway

Connect gateway acts as a proxy for accessing your cluster using the kubectl CLI tool. Each user account requesting cluster credentials through Connect gateway must have the permissions described in Grant IAM roles to users in the Connect gateway documentation. Keep in mind that you cannot run kubectl exec or kubectl port-forward commands through Connect gateway.

Before requesting credentials through Connect gateway, you must first install the gke-gcloud-auth-plugin plugin using the following command:

 gcloud components install gke-gcloud-auth-plugin

To obtain cluster credentials through Connect gateway, use the following command:

 gcloud container hub memberships get-credentials CLUSTER_ID --project=PROJECT_ID

Replace the following:

{ % endcomment % }

Configure a maintenance window for a cluster

This section describes how to specify and clear the following types of maintenance windows for a Distributed Cloud connected cluster:

Warning: A Distributed Cloud connected cluster does not have a default maintenance window. This means that a software update can potentially bring down a critical workload. To ensure high availability, we strongly recommend that you configure staggered maintenance windows and configure maintenance exclusion windows for your clusters. Specify a maintenance window for a cluster

To specify a maintenance window for a Distributed Cloud connected cluster, complete the steps in this section. For more information about cluster maintenance, see Understand software updates and maintenance windows.

For date and time formats, use RFC 5545.

To complete this task, you must have the Edge Container Admin role (roles/edgecontainer.admin) in your Google Cloud project.

Console

If you are using the Google Cloud console, you can only specify a maintenance window when you create a cluster. To specify a maintenance window on an existing cluster, you must use the Google Cloud CLI or the Distributed Cloud Edge Container API.

gcloud

Use the gcloud edge-cloud container clusters update command:

gcloud edge-cloud container clusters update CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --maintenance-window-start=MAINTENANCE_START \
    --maintenance-window-end=MAINTENANCE_END \
    --maintenance-window-recurrence=MAINTENANCE_FREQUENCY

Replace the following:

API

Make a PATCH request to the projects.locations.clusters.update method:

PATCH /v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID?updateMask=maintenancePolicy&requestId=REQUEST_ID
{
 "maintenance_policy": {
   "window": {
     "recurring_window": {
       "window": {
         "start_time": "MAINTENANCE_START",
         "end_time": "MAINTENANCE_END"
         },
       "recurrence": "MAINTENANCE_FREQUENCY"
     }
   }
 }
}

Replace the following:

For more information, see Resource: cluster.

Clear the maintenance window for a cluster

To clear the maintenance window for a Distributed Cloud connected cluster, complete the steps in this section. Clearing a maintenance window for a cluster also clears all corresponding maintenance exclusion windows for that cluster. For more information about cluster maintenance, see Understand software updates and maintenance windows.

To complete this task, you must have the Edge Container Admin role (roles/edgecontainer.admin) in your Google Cloud project.

gcloud

Use the gcloud edge-cloud container clusters update command:

gcloud edge-cloud container clusters update CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --clear-maintenance-window

Replace the following:

API

Make a PATCH request to the projects.locations.clusters.update method:

PATCH /v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID?updateMask=maintenancePolicy&requestId=REQUEST_ID
{
 "maintenance_policy": null
}

Replace the following:

For more information, see Resource: cluster.

Specify a maintenance exclusion window for a cluster

To specify a maintenance exclusion window for a Distributed Cloud connected cluster, complete the steps in this section. For more information about cluster maintenance, see Understand software updates and maintenance windows.

For date and time formats, use RFC 3339.

To complete this task, you must have the Edge Container Admin role (roles/edgecontainer.admin) in your Google Cloud project.

gcloud

Use the gcloud edge-cloud container clusters update command:

gcloud edge-cloud container clusters update CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --add-maintenance-exclusion-name=EXCLUSION_NAME \
    --add-maintenance-exclusion-start=EXCLUSION_START \
    --add-maintenance-exclusion-end=EXCLUSION_END

Replace the following:

Clear the maintenance exclusion window for a cluster

To clear the maintenance exclusion window for a Distributed Cloud connected cluster, complete the steps in this section. For more information about cluster maintenance, see Understand software updates and maintenance windows.

To complete this task, you must have the Edge Container Admin role (roles/edgecontainer.admin) in your Google Cloud project.

gcloud

Use the gcloud edge-cloud container clusters update command:

gcloud edge-cloud container clusters update CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION \
    --remove-maintenance-exclusion-window=MAINTENANCE_EXCLUSION_WINDOW

Replace the following:

Delete a cluster

To delete a Distributed Cloud connected cluster, complete the steps in this section. Before you can delete a cluster, you must first do the following:

To complete this task, you must have the Edge Container Admin role (roles/edgecontainer.admin) in your Google Cloud project.

gcloud

Use the gcloud edge-cloud container clusters delete command:

gcloud edge-cloud container clusters delete CLUSTER_ID \
    --project=PROJECT_ID \
    --location=REGION

Replace the following:

API

Make a DELETE request to the projects.locations.clusters.delete method:

DELETE /v1/projects/PROJECT_ID/locations/REGION/clusters/CLUSTER_ID?requestId=REQUEST_ID

Replace the following:

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