Skip to content

"kubectl get cluster-api" prints deprecation warnings #5918

@mboersma

Description

@mboersma

/kind bug

What steps did you take and what happened:

I ran the command kubectl get cluster-api, but it printed several lines of deprecation warnings about AzureManagedCluster and friends, despite those objects not being present in the cluster.

$ k get cluster-api
Warning: AzureManagedCluster and the AzureManaged API are deprecated. Please migrate to infrastructure.cluster.x-k8s.io/v1beta1 AzureASOManagedCluster and related AzureASOManaged resources instead.
Warning: AzureManagedClusterTemplate and the AzureManaged API are deprecated. Please migrate to infrastructure.cluster.x-k8s.io/v1beta1 AzureASOManagedClusterTemplate and related AzureASOManaged resources instead.
Warning: AzureManagedControlPlane and the AzureManaged API are deprecated. Please migrate to infrastructure.cluster.x-k8s.io/v1beta1 AzureASOManagedControlPlane and related AzureASOManaged resources instead.
Warning: AzureManagedControlPlaneTemplate and the AzureManaged API are deprecated. Please migrate to infrastructure.cluster.x-k8s.io/v1beta1 AzureASOManagedControlPlaneTemplate and related AzureASOManaged resources instead.
Warning: AzureManagedMachinePool and the AzureManaged API are deprecated. Please migrate to infrastructure.cluster.x-k8s.io/v1beta1 AzureASOManagedMachinePool and related AzureASOManaged resources instead.
Warning: AzureManagedMachinePoolTemplate and the AzureManaged API are deprecated. Please migrate to infrastructure.cluster.x-k8s.io/v1beta1 AzureASOManagedMachinePoolTemplate and related AzureASOManaged resources instead.
NAME                                                            AGE
clusterresourceset.addons.cluster.x-k8s.io/crs-calico-windows   28m
clusterresourceset.addons.cluster.x-k8s.io/csi-proxy            28m

NAME                                                                       CLUSTER       AGE
kubeadmconfig.bootstrap.cluster.x-k8s.io/default-851-control-plane-xcfm2   default-851   5m48s

NAME                                                                AGE
kubeadmconfigtemplate.bootstrap.cluster.x-k8s.io/default-851-md-0   8m59s

NAME                                   CLUSTERCLASS   PHASE      AGE     VERSION
cluster.cluster.x-k8s.io/default-851                  Deleting   8m59s   

NAME                                                  CLUSTER       REPLICAS   READY   UPDATED   UNAVAILABLE   PHASE     AGE     VERSION
machinedeployment.cluster.x-k8s.io/default-851-md-0   default-851   2          2       2         0             Running   8m59s   v1.32.0

NAME                                                       CLUSTER       NODENAME                          PROVIDERID                                                                                                                                                           PHASE      AGE     VERSION
machine.cluster.x-k8s.io/default-851-control-plane-xcfm2   default-851   default-851-control-plane-xcfm2   azure:///subscriptions/e240e532-1923-4fe0-86da-28abc43fc4c7/resourceGroups/default-851/providers/Microsoft.Compute/virtualMachines/default-851-control-plane-xcfm2   Running    5m48s   v1.32.0
machine.cluster.x-k8s.io/default-851-md-0-hjtr5-7cgk7      default-851   default-851-md-0-hjtr5-7cgk7      azure:///subscriptions/e240e532-1923-4fe0-86da-28abc43fc4c7/resourceGroups/default-851/providers/Microsoft.Compute/virtualMachines/default-851-md-0-hjtr5-7cgk7      Deleting   5m44s   v1.32.0

NAME                                                 CLUSTER       REPLICAS   READY   AVAILABLE   AGE     VERSION
machineset.cluster.x-k8s.io/default-851-md-0-hjtr5   default-851   1          1       1           8m59s   v1.32.0

NAME                                                                          CLUSTER       INITIALIZED   API SERVER AVAILABLE   REPLICAS   READY   UPDATED   UNAVAILABLE   AGE     VERSION
kubeadmcontrolplane.controlplane.cluster.x-k8s.io/default-851-control-plane   default-851   true          true                   1          1       1         0             8m59s   v1.32.0

NAME                                                                       TYPE              AGE
azureclusteridentity.infrastructure.cluster.x-k8s.io/cluster-identity-ci   UserAssignedMSI   24m

NAME                                                       CLUSTER       READY   REASON   AGE
azurecluster.infrastructure.cluster.x-k8s.io/default-851   default-851   True             8m59s

NAME                                                                           READY   SEVERITY   REASON   STATE       AGE
azuremachine.infrastructure.cluster.x-k8s.io/default-851-control-plane-xcfm2   True                        Succeeded   5m48s

NAME                                                                             AGE
azuremachinetemplate.infrastructure.cluster.x-k8s.io/default-851-control-plane   8m59s
azuremachinetemplate.infrastructure.cluster.x-k8s.io/default-851-md-0            8m59s

What did you expect to happen:

Only to be warned about deprecated objects when they are actually present.

Anything else you would like to add:

Environment:

  • cluster-api-provider-azure version: main, post v1.21
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions