0

I have a cluster which has 3 nodes and each node has been allocated 4 core CPUs(3.92 to be precise). I have a nexus repository in one of my nodes which requires a minimum of 4 Core CPUs and this node is unable to allocate 4CPUs. Hence, I am only able to allocate only 3 CPUs for nexus repository in that. Could anyone tell me how to edit the cluster to update the 4 core CPUs allocated for nodes to 6 core CPUs or is there any other solution to it?

Note: I have already tried increasing the nodes in cluster but it is not working.

Thanks in advance.

  • This post is very useful to set [CPU and Memory](https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-resource-requests-and-limits) to pods in GKE – Nadia Espinosa Sep 30 '21 at 21:24

1 Answers1

0

You cannot actually change the CPU/Mem for a node pool.

You have two options:

  1. Create a new node pool with the new node CPU/Mem sizes. You'll then need to migrate your workloads to the new node pool. You can follow https://cloud.google.com/kubernetes-engine/docs/tutorials/migrating-node-pool to do this.

  2. Alternatively, you can also enable node auto-provisioning for your cluster and it will automatically add new right-sized node(s) based on your pod spec(s).

    gcloud container clusters update CLUSTER_NAME \
    --enable-autoprovisioning \
    --min-cpu MINIMUM_CPU \
    --min-memory MIMIMUM_MEMORY \
    --max-cpu MAXIMUM_CPU \
    --max-memory MAXIMUM_MEMORY \
    --autoprovisioning-scopes=https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/devstorage.read_only

Gari Singh
  • 11,418
  • 2
  • 18
  • 41