gke - configuring cluster node blue-green upgrade (new features)

We can configure our cluster's node to support blue-green upgrade. A blue green upgrade will ensure you workload able to rollback to the older nodepool if deployment is not successful. 

You can setup that up by creating a cluster (manual) and configuring the nodepool and selecting the blue-green upgrade option. (more details here)



If you would like to use command to do it

gcloud container node-pools update default-pool \                                                                           
    --cluster=cluster-1 \
    --zone=australia-southeast1-a \
    --enable-blue-green-upgrade

Updating node pool default-pool... Updating default-pool, processed 0 out of 3 nodes (0.0%)...done.                                                                                                                
And if you would like to check using gcloud command :- 



If you have existing cluster you can ugrade it 
gcloud container clusters create-auto private-cluster-1 \
    --create-subnetwork name=my-subnet-1 \
    --enable-master-authorized-networks \
    --enable-private-nodes

gcloud container clusters create-auto private-cluster-1 \
    --create-subnetwork name=my-subnet-1 \
    --enable-master-authorized-networks \
    --enable-private-nodesgcloud container clusters create-auto private-cluster-1 \
    --create-subnetwork name=my-subnet-1 \
    --enable-master-authorized-networks \
    --enable-private-nodes

Here are some handy command when dealing with node upgrade

List upgrade operations 

gcloud container operations list \
      --location=CONTROL_PLANE_LOCATION
gcloud container clusters create-auto private-cluster-1 \
    --create-subnetwork name=my-subnet-1 \
    --enable-master-authorized-networks \
    --enable-private-nodes
gcloud container operations list \
      --location=CONTROL_PLANE_LOCATION
gcloud container operations list \
      --location=CONTROL_PLANE_LOCATION

Cancel upgrade operations 

gcloud container operations cancel OPERATION_ID \
      --location=CONTROL_PLANE_LOCATION

To resume upgrade 

gcloud container clusters upgrade CLUSTER_NAME \
  --node-pool=NODE_POOL_NAME \
  --location=CONTROL_PLANE_LOCATION \
  --cluster-version VERSION
gcloud container clusters upgrade CLUSTER_NAME \
  --node-pool=NODE_POOL_NAME \
  --location=CONTROL_PLANE_LOCATION \
  --cluster-version VERSION
gcloud container clusters upgrade CLUSTER_NAME \
  --node-pool=NODE_POOL_NAME \
  --location=CONTROL_PLANE_LOCATION \
  --cluster-version VERSION
gcloud container clusters upgrade CLUSTER_NAME \
  --node-pool=NODE_POOL_NAME \
  --location=CONTROL_PLANE_LOCATION \
  --cluster-version VERSION
gcloud container clusters upgrade CLUSTER_NAME \
  --node-pool=NODE_POOL_NAME \
  --location=CONTROL_PLANE_LOCATION \
  --cluster-version VERSION




Comments

Popular posts from this blog

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

llama cpp running it in google colab