Open aakashnagpal4567 opened 2 months ago
Adding more context to it.
I tried recreating the issue, but I stumbled upon the following:
When you create the cluster using UI, it is not getting reflected in the CLI, and vice-versa. That's why you got that error.
cluster on the UI:
CLI giving error:
cluster created on CLI, not reflecting the UI:
Nothing on the UI:
Quota rightly swelling up though:
Post cluster creation using the UI, I couldn't scale down to zero node node-pool as shown in your video, it gave an error. For n != 0
scaling up and down is going through as intended.
When you create the cluster using CLI, it gets created successfully, scaling up and down the node-pool also goes as intended, except when you want to scale down to zero nodes.
Summary:
@Praveen005 could it be you were on one region on the UI and in another on the CLI?
@Praveen005 For this you need to create two node pools, please read the 1st point in "Steps to replicate". Currently, you can't scale the node pool to zero using CLI, it can only be done via the UI. We also have to add this functionality, if there are multiple node pools, we should be able to scale the node pool to zero, and also have to ensure that there should be at least one node in the cluster.
Hi @fernando-villalba, You were right, it was a region mismatch. Thank you.
@aakashnagpal4567 I could recreate the issue now. Thank you.
Hi Sir, @fernando-villalba
I wanted to update you on the issue, I worked on it,
And here is the gist:
Currently, scaling up a node pool with zero nodes using CIVO CLI results in an error because we are searching for the node pool in kubernetesFindCluster.Pools
. However, when a node pool is scaled down to zero nodes, it is no longer active and cannot be found, leading to the error.
To fix this, we can look for the pool in kubernetesFindCluster.RequiredPools
. and add it to the nodePool. Like below:
This fix solves one part of the issue. I have tested it, and it works fine.
Result:
Initial state: one node pool with zero node
Can't scale up using CLI:
Post code changes:
Node pool rightly getting scaled up:
Change reflecting in UI:
Up & Running:
For the second part,
Even when I pass two node-pools in which one clearly has an active node , as evident below:
configKubernetes: &{ NYC1 1 [{ ad8793ba-dbfe-4286-a276-7167fc19ef38 1 g4s.kube.xsmall map[] [] false} { f805408a-de4c-4fb6-9989-fa1010b686d8 0 g4s.kube.xsmall map[] [] false}] }
I am getting the following error:
It needs to seen, how validation on the server side is happening.
Regards!
Description
When there is no node in the node pool in the cluster, when we scale that node pool using Civo CLI, it's giving the error. This functionality is working fine in the UI.
Steps to Replicate
civo kubernetes node-pool scale CLUSTER_NAME NODEPOOL_ID -n <NUMBER_OF_NODES>
For example, i tried to scale the node in the node pool that is empty, it gives an error:
For reference, I'm attaching a video here:
https://github.com/user-attachments/assets/e4541f2f-03c4-485b-85b7-25661b7385d3
Acceptance Criteria