Updating the memory for each worker node in OKE k8s cluster node pool using terraform is not working

Solution 1:

The Oracle docs says that:

You can use Container Engine for Kubernetes to modify the properties of node pools and worker nodes in existing Kubernetes clusters.

You can change:

  • the version of Kubernetes to run on new worker nodes
  • the image to use for new worker nodes
  • the shape to use for new worker nodes
  • the boot volume size to use for new worker nodes

Also note the following:

Any changes you make to worker node properties will only apply to new worker nodes. You cannot change the properties of existing worker nodes.

That means, the changes are applied to only new worker nodes in the node pool.

In situations, when we want to update properties of all the worker nodes in a node pool simultaneously (like, upgrading all worker nodes to a new version of Oracle Linux), then we should create a new node pool with worker nodes that have the required properties, and shift work from the original node pool to the new node pool using the kubectl drain command and pod disruption budgets.