Skip to content
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

Self-managed infrastructure of CAPZ crash loops when AzureManagedControlPlane is not installed #5472

Open
bryan-cox opened this issue Mar 6, 2025 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@bryan-cox
Copy link
Contributor

/kind bug

[Before submitting an issue, have you checked the Troubleshooting Guide self-managed & managed?]

What steps did you take and what happened:

  • Setup a self-managed version of CAPZ
  • Did not install any managed CRs
  • Started pod with CAPZ
  • Pod crash loops looking for AzureManagedControlPlane CR

What did you expect to happen:

  • CAPZ to reconcile without errors

Anything else you would like to add:
Here is a log snippet:

I0306 20:13:49.394660       1 controller.go:175] "Starting EventSource" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" source="kind source: *v1beta1.AzureMachine"
I0306 20:13:49.394727       1 controller.go:175] "Starting EventSource" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" source="kind source: *v1beta1.Machine"
I0306 20:13:49.394755       1 controller.go:175] "Starting EventSource" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" source="kind source: *v1beta1.AzureCluster"
I0306 20:13:49.394779       1 controller.go:175] "Starting EventSource" controller="azuremachinetemplate" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachineTemplate" source="kind source: *v1beta1.AzureMachineTemplate"
I0306 20:13:49.394799       1 controller.go:175] "Starting EventSource" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" source="kind source: *v1beta1.Cluster"
I0306 20:13:49.394809       1 controller.go:183] "Starting Controller" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine"
I0306 20:13:49.394809       1 controller.go:175] "Starting EventSource" controller="azuremachinetemplate" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachineTemplate" source="kind source: *v1.Secret"
I0306 20:13:49.394826       1 controller.go:175] "Starting EventSource" controller="azuremachinetemplate" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachineTemplate" source="kind source: *v1beta1.Cluster"
I0306 20:13:49.394839       1 controller.go:183] "Starting Controller" controller="azuremachinetemplate" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachineTemplate"
I0306 20:13:49.395175       1 controller.go:175] "Starting EventSource" controller="azurecluster" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" source="kind source: *v1beta1.AzureCluster"
I0306 20:13:49.395231       1 controller.go:175] "Starting EventSource" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" source="kind source: *v1beta1.AzureMachine"
I0306 20:13:49.395274       1 controller.go:175] "Starting EventSource" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" source="kind source: *v1.Secret"
I0306 20:13:49.395288       1 controller.go:175] "Starting EventSource" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" source="kind source: *v1beta1.Cluster"
I0306 20:13:49.395297       1 controller.go:183] "Starting Controller" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine"
I0306 20:13:49.395237       1 controller.go:175] "Starting EventSource" controller="azurecluster" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" source="kind source: *v1beta1.Cluster"
I0306 20:13:49.395349       1 controller.go:183] "Starting Controller" controller="azurecluster" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster"
I0306 20:13:49.395440       1 controller.go:175] "Starting EventSource" controller="ASOSecret" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" source="kind source: *v1beta1.AzureCluster"
I0306 20:13:49.395456       1 controller.go:175] "Starting EventSource" controller="ASOSecret" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" source="kind source: *v1.Secret"
I0306 20:13:49.395467       1 controller.go:175] "Starting EventSource" controller="ASOSecret" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" source="kind source: *v1.Secret"
I0306 20:13:49.395485       1 controller.go:175] "Starting EventSource" controller="ASOSecret" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" source="kind source: *v1beta1.AzureManagedControlPlane"
I0306 20:13:49.395514       1 controller.go:175] "Starting EventSource" controller="ASOSecret" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" source="kind source: *v1beta1.Cluster"
I0306 20:13:49.395523       1 controller.go:183] "Starting Controller" controller="ASOSecret" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster"
E0306 20:13:49.542217       1 kind.go:71] "if kind is a CRD, it should be installed before calling Start" err="failed to get restmapping: no matches for kind \"AzureManagedControlPlane\" in version \"infrastructure.cluster.x-k8s.io/v1beta1\"" logger="controller-runtime.source.EventHandler" kind="AzureManagedControlPlane.infrastructure.cluster.x-k8s.io"
I0306 20:13:49.644017       1 controller.go:217] "Starting workers" controller="azurecluster" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" worker count=10
I0306 20:13:49.644463       1 controller.go:217] "Starting workers" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" worker count=10
I0306 20:13:49.674826       1 controller.go:217] "Starting workers" controller="azuremachinetemplate" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachineTemplate" worker count=10
I0306 20:13:49.676722       1 azurejson_machinetemplate_controller.go:199] "WARNING, You are using Service Principal authentication for Cloud Provider Azure which is less secure than Managed Identity. Your Service Principal credentials will be written to a file on the disk of each VM in order to be accessible by Cloud Provider. To learn more, see https://capz.sigs.k8s.io/topics/identities-use-cases.html#azure-host-identity " logger="controllers.AzureJSONTemplateReconciler.Reconcile" controller="azuremachinetemplate" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachineTemplate" AzureMachineTemplate="clusters-generic-hc/generic-hc-074c602f" namespace="clusters-generic-hc" name="generic-hc-074c602f" reconcileID="2751214a-a3f7-4996-9ba3-fabdef7c92d9" namespace="clusters-generic-hc" name="generic-hc-074c602f" kind="AzureMachineTemplate" x-ms-correlation-request-id="59ff8467-f774-47a9-961c-ecb4458b204d" cluster="generic-hc-wvbjf"
I0306 20:13:49.703783       1 azurejson_machinetemplate_controller.go:199] "WARNING, You are using Service Principal authentication for Cloud Provider Azure which is less secure than Managed Identity. Your Service Principal credentials will be written to a file on the disk of each VM in order to be accessible by Cloud Provider. To learn more, see https://capz.sigs.k8s.io/topics/identities-use-cases.html#azure-host-identity " logger="controllers.AzureJSONTemplateReconciler.Reconcile" controller="azuremachinetemplate" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachineTemplate" AzureMachineTemplate="clusters-generic-hc/generic-hc-074c602f" namespace="clusters-generic-hc" name="generic-hc-074c602f" reconcileID="3a13697c-b87c-45a7-837e-4584bcd1ecd3" namespace="clusters-generic-hc" name="generic-hc-074c602f" kind="AzureMachineTemplate" x-ms-correlation-request-id="7d957862-5907-485e-b5ba-56a47cc38b0c" cluster="generic-hc-wvbjf"
I0306 20:13:49.748783       1 azuremachine_controller.go:240] "Reconciling AzureMachine" logger="controllers.AzureMachineReconciler.reconcileNormal" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" AzureMachine="clusters-generic-hc/generic-hc-dcqkn-cslwh" namespace="clusters-generic-hc" name="generic-hc-dcqkn-cslwh" reconcileID="b0a71634-17fe-4281-84fe-d2a4683fb262" x-ms-correlation-request-id="2d7e7842-24ba-498c-ad8d-dbdfa497955f"
I0306 20:13:49.752132       1 azuremachine_controller.go:240] "Reconciling AzureMachine" logger="controllers.AzureMachineReconciler.reconcileNormal" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" AzureMachine="clusters-generic-hc/generic-hc-dcqkn-jzml6" namespace="clusters-generic-hc" name="generic-hc-dcqkn-jzml6" reconcileID="be3585f6-50e8-43ac-a022-8bdf61cabb72" x-ms-correlation-request-id="426ea272-2429-4220-8e6a-f82893d17bb0"
I0306 20:13:49.756726       1 controller.go:217] "Starting workers" controller="azuremachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureMachine" worker count=10
I0306 20:13:49.767607       1 warning_handler.go:65] "metadata.finalizers: \"azuremachine.infrastructure.cluster.x-k8s.io\": prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writers" logger="KubeAPIWarningLogger"
I0306 20:13:49.813350       1 server.go:247] "Serving metrics server" logger="controller-runtime.metrics" bindAddress=":8443" secure=true
E0306 20:13:59.411017       1 kind.go:71] "if kind is a CRD, it should be installed before calling Start" err="failed to get restmapping: no matches for kind \"AzureManagedControlPlane\" in version \"infrastructure.cluster.x-k8s.io/v1beta1\"" logger="controller-runtime.source.EventHandler" kind="AzureManagedControlPlane.infrastructure.cluster.x-k8s.io"

Environment:

  • cluster-api-provider-azure version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 6, 2025
@bryan-cox
Copy link
Contributor Author

@nawazkh this is the bug I was referring to earlier today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Status: Todo
Development

No branches or pull requests

2 participants