[BUG] Deallocated nodes are being reported as "Unhealthy"
Describe the bug
When node pool --scale-down-mode is being set to Deallocate and scale in 1 node after then, it will cause Unhealty report on Azure portal.
To Reproduce
# Basic parameter for set-up
aks=
rG=
location=southeastasia
# Create resource group
az group create -n ${rG} -l ${location}
# Set `--node-os-upgrade-channel` to None in case cannot scale/change nodepool properties later
az aks create -n ${aks} -g ${rG} \
--nodepool-name agentpool \
--node-count 2 \
--node-os-upgrade-channel None \
--no-ssh-key
# Set to Deallocate for reproducing
az aks nodepool update --name agentpool --cluster-name ${aks} -g ${rG} \
--scale-down-mode Deallocate
# Reproducing issue by scaling in one node
az aks nodepool scale --name agentpool --cluster-name ${aks} -g ${rG} \
--node-count 1
# Giving time for AKS to fully processing
sleep 120
# Checking node ready status
# Issue reproduced here
az aks get-credentials -n ${aks} -g ${rG}
kubectl get node
# Try if stop/start fix the issue
# Stop AKS
az aks stop -n ${aks} -g ${rG}
# Start AKS
az aks start -n ${aks} -g ${rG}
# Issue persists
kubectl get node
(Health warning popped up like after ~30 mins after restarting the AKS (part 2 of the script), simply wait and check Azure portal in 30 mins. Make sure the page is being fully refreshed by using Ctrl+F5.)
Expected behavior The deallocated nodes should be removed from AKS node list.
Screenshots
"The node could not be found in running/powered on state."
(Why there are still 5 Pods on supposed-not-started node? I don't know.)
Environment (please complete the following information):
- CLI Version: 2.61.0
- Kubernetes version: 1.28.9
- CLI Extension version: N/A
- Browser: Cloud Shell
Additional context In my memory, this issue persists a long time ago, I just start to dig the root cause today.
Hey @pavneeta I spoke to you about this at KubeCon Paris. Seems someone else is also seeing the same. Is this on the roadmap to resolve/tidy up?
Hi @JoeyC-Dev i think this is expected behavior for --scale-down-mode Deallocate if you want to delete the NotReady nodes you need to use --scale-down-mode Delete
Reference : Warning In order to preserve any deallocated VMs, you must set Scale-down Mode to Deallocate. That includes VMs that have been deallocated using IaaS APIs (Virtual Machine Scale Set APIs). Setting Scale-down Mode to Delete will remove any deallocate VMs. Once applied the deallocated mode and scale down operation occurred, those nodes keep registered in APIserver and appear as NotReady state.
https://learn.microsoft.com/en-us/azure/aks/scale-down-mode#before-you-begin
@abarqawi Be real honest, this is sad. It looks like this warning is existing for 3+ years.
Preserving nodes is still necessary from my sight: especially when need to scale out hundreds of nodes when I need it in a very short time and deallocate them when not needed. So --scale-down-mode Deallocate is still needed.
I know the "virtual nodes" which is even capable of launching thousands of instances within short time but:
Is this really acceptable as a workaround? I have my doubt on this.
The Unhealthy status is discouraging. Maybe it is necessary to preserve them in control plane, but at least suppress the "Unhealthy" from Azure portal. Because it will make user keep ignoring the yellow bar on the top of the Azure portal and will not be aware of real matter warning appear at the same place.
For example: kubelet down, and it caused the nodes are not up. I have seen some users reported facing kubelet down issue recently because they find out the nodes are not up. If user get used to this "Unhealthy" thing, they will eventually ignore the real issue when it comes as they thought it is still the usual thing.
Maybe some improvements can be done, for real.
I don't know if there is a way to vote on this requested change, but I want to add our voice in support of the frustration of not being able to use Deallocate mode on node pools without putting the AKS cluster in a forever "warning" state.
It also causes constant confusion with Azure support. Whenever we open a case regarding our AKS clusters, Azure support first says our clusters are unhealthy and point to the resource health which has one or more health event for every day that just says:
Customer Nodes Power Off (Customer Initiated)
At Thursday, September 5, 2024 at 12:35:17 AM EDT, the Azure monitoring system received the following information regarding your Azure Kubernetes Service (AKS):
Multiple nodes could not be found in running/powered on state.
This is firstly wrong because we did not initiate any node power off. It is a built-in feature of AKS!
But it also causes delays in our support resolution as we need to convince Azure support this is not a real issue with our cluster.
This is the expected behavior. Please see the doc. https://learn.microsoft.com/en-us/azure/aks/scale-down-mode
This is the expected behavior. Please see the doc. https://learn.microsoft.com/en-us/azure/aks/scale-down-mode
![]()
I disagree that the documentation you linked describes the downsides of this feature. Please reconsider.
I agree with @chandlerkent. Happy to jump on a call and explain further if needed.
I decide to append something here: To clarify, the intent of this issue is to mark out the disturbing behavior this feature brought to users. I don't need anyone contact me via Teams to tell me "this is a feature, so please close this issue".
Why cannot consider adding a label to the node which is being deallocated, and exclude the event/alert with that specific label after then? Isn't this a solution to mitigate? So no more alert will be appearing in Azure portal? Who mentioned that "NotReady" state is not intended? The expectation is to let the warning in Azure portal against deallocated nodes disappeared. Using so-called document to explain this issue is for what? Telling that "NotReady" state is expected when users are not asking for solving "NotReady"? (ofc it will be better to be solved as it will have better compatibility with 3rd party monitoring tools)
Although it will be better if deallocated nodes can disappear in the node list, but at the very least: suppress the warning in Azure portal/Azure product (non-Kubernetes) as it should not be there.
I clearly understand what I am stating. For everyone, especially who titled themselves as "senior", please read the thread before next action.
I to am having this same issue. I find that Microsoft implementation of K8s less than production ready. Like @JoeyC-Dev said, we accept that the node is in a "not ready" state given we use autoscaling with deallocation on GPU nodes to keep cost down but also to speed up the poor throughput on ACR which is capped at 100Mbs. We are running AI with extremely large containers and when using the delete down scale option, it takes nearly 15 minutes to spin up again and around 7 minutes just to pull the image from ACR. This isn't a production ready solution for highly burstable nodes/containers and at present virtual nodes do not support GPU. So again Microsoft have made my day ...... NOT !!!! Fire the people making these stupid decisions and then get someone in who knows the requirements of a production ready K8s with targets from a customers viewpoint. All we are asking for is a label on the portal to be added against the alert so that ANY server that is deallocated is no longer alerted against when its in a not ready state
Adding 'under investigation' to block stale/close. @kevinkrp93 expect ping from automation on this in future.
is anybody at Azure/Microsoft going to fix this or at least provide feedback to this issue ? This has been over a year now and little and no movement from Microsoft
This issue needs attention of @allyford, @kevinkrp93. Please provide an update on the investigation progress. Thanks!
This issue needs attention of @allyford, @kevinkrp93. Please provide an update on the investigation progress. Thanks!
This issue needs attention of @allyford, @kevinkrp93. Please provide an update on the investigation progress. Thanks!
This issue needs attention of @allyford, @kevinkrp93. Please provide an update on the investigation progress. Thanks!
This issue needs attention of @allyford, @kevinkrp93. Please provide an update on the investigation progress. Thanks!
This issue needs attention of @allyford, @kevinkrp93. Please provide an update on the investigation progress. Thanks!
no updates on this issue
This issue needs attention of @allyford, @kevinkrp93. Please provide an update on the investigation progress. Thanks!
This issue needs attention of @allyford, @kevinkrp93. Please provide an update on the investigation progress. Thanks!