-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Similar issue #2656 (AKS Cluster must have at least one system pool) happens on the latest version of capz. #4341
Comments
It seems that #3426 may not be working as we think... Do you see the annotation |
@nawazkh @willie-yao would one of you be able to look into this one? |
Related: #4157 |
/assign |
@nawazkh Sorry I got to this a bit late. Let me know if you want to pair on this! |
Thanks @willie-yao ! I will reach out if needed! :) |
I am able to reproduce this locally. ❯ clusterctl -v 5 move --to-kubeconfig capi-quickstart-config.config
No default config file available
Performing move...
Discovering Cluster API objects
ManagedCluster Count=1
ConfigMap Count=1
AzureManagedMachinePool Count=2
ResourceGroup Count=1
Secret Count=5
Cluster Count=1
MachinePool Count=2
AzureManagedCluster Count=1
AzureManagedControlPlane Count=1
AzureClusterIdentity Count=1
ManagedClustersAgentPool Count=2
Total objects Count=18
Excluding secret from move (not linked with any Cluster) name="cluster-identity-secret"
Moving Cluster API objects Clusters=1
Moving Cluster API objects ClusterClasses=0
Pausing the source cluster
Set Cluster.Spec.Paused Paused=true Cluster="capi-quickstart" Namespace="default"
Pausing the source cluster classes
Creating target namespaces, if missing
Creating objects in the target cluster
Creating AzureClusterIdentity="cluster-identity" Namespace="default"
Creating Cluster="capi-quickstart" Namespace="default"
Creating MachinePool="capi-quickstart-pool1" Namespace="default"
Creating AzureManagedControlPlane="capi-quickstart" Namespace="default"
Creating MachinePool="capi-quickstart-pool0" Namespace="default"
Creating AzureManagedCluster="capi-quickstart" Namespace="default"
Creating ResourceGroup="capi-quickstart" Namespace="default"
Creating AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Creating AzureManagedMachinePool="capi-quickstart-pool1" Namespace="default"
Creating Secret="capi-quickstart-aso-secret" Namespace="default"
Creating Secret="capi-quickstart-kubeconfig" Namespace="default"
Creating Secret="capi-quickstart-ca" Namespace="default"
Creating ManagedCluster="capi-quickstart" Namespace="default"
Creating ManagedClustersAgentPool="capi-quickstart-pool0" Namespace="default"
Creating Secret="capi-quickstart-aso-kubeconfig" Namespace="default"
Creating ManagedClustersAgentPool="capi-quickstart-pool1" Namespace="default"
Deleting objects from the source cluster
Deleting ManagedClustersAgentPool="capi-quickstart-pool0" Namespace="default"
Deleting Secret="capi-quickstart-aso-kubeconfig" Namespace="default"
Deleting ManagedClustersAgentPool="capi-quickstart-pool1" Namespace="default"
Deleting ManagedCluster="capi-quickstart" Namespace="default"
Deleting ResourceGroup="capi-quickstart" Namespace="default"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Retrying with backoff Cause="error deleting \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool\" default/capi-quickstart-pool0: admission webhook \"validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io\" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool"
Deleting AzureManagedMachinePool="capi-quickstart-pool0" Namespace="default"
Deleting AzureManagedMachinePool="capi-quickstart-pool1" Namespace="default"
Deleting Secret="capi-quickstart-aso-secret" Namespace="default"
Deleting Secret="capi-quickstart-kubeconfig" Namespace="default"
Deleting Secret="capi-quickstart-ca" Namespace="default"
Error: action failed after 10 attempts: error deleting "infrastructure.cluster.x-k8s.io/v1beta1, Kind=AzureManagedMachinePool" default/capi-quickstart-pool0: admission webhook "validation.azuremanagedmachinepools.infrastructure.cluster.x-k8s.io" denied the request: if the delete is triggered via owner MachinePool please refer to trouble shooting section in https://capz.sigs.k8s.io/topics/managedcluster.html: AKS Cluster must have at least one system pool *Update: probing further. |
I figured out why this is happening. So either we update the CAPZ's webhook cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_webhook.go Lines 340 to 343 in a1f0ccc
AzureManagedMachinePool 's annotations.
OR Update CAPI's move operation to update owner cluster (in here) As of current clusterctl's implementation, |
Looking at the original PR that added
I sense that the author wanted to add |
/kind bug
[Before submitting an issue, have you checked the Troubleshooting Guide?]
What steps did you take and what happened:
Similar issue #2656 happens on the latest version of capz.
While
clusterctl move --to-kubeconfig=...
What did you expect to happen:
Success of
clusterctl move --to-kubeconfig=...
Anything else you would like to add:
Succeeded on capz version "v1.11.6"
Environment:
host cluster (kind) version: 1.27.3
clusterctl version:
The text was updated successfully, but these errors were encountered: