Cluster-api-provider-azure: Azure clusterctl infrastructure init fails on mac os.

Created on 29 Jun 2021  路  8Comments  路  Source: kubernetes-sigs/cluster-api-provider-azure

/kind bug

abhishekr-mbp:capi abhishekr$ clusterctl version
clusterctl version: &version.Info{Major:"0", Minor:"4", GitVersion:"v0.4.0", GitCommit:"7f879be68d15737e335b6cb39d380d1d163e06e6", GitTreeState:"clean", BuildDate:"2021-06-24T21:54:23Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/amd64"}
abhishekr-mbp:capi abhishekr$
abhishekr-mbp:capi abhishekr$ clusterctl init --infrastructure azure
Fetching providers
Error: current version of clusterctl could install only v1alpha4 providers, detected v1alpha3 for provider infrastructure-azure

What steps did you take and what happened:
[A clear and concise description of what the bug is.]

Expected CAPI cluster to be initialized.

What did you expect to happen:

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • cluster-api-provider-azure version: v0.4.0
  • Kubernetes version: (use kubectl version):
  • abhishekr-mbp:~ abhishekr$ kubectl version
    Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:28:09Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"darwin/amd64"}
    Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-21T23:01:33Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
  • OS (e.g. from /etc/os-release): mac-os Big-sur 11.4
kinbug

Most helpful comment

I was using 0.4.0 as you pointed out, after downgrading to 0.3.19 it started functioning.

All 8 comments

@abhishek-jnpr see this related issue: https://github.com/kubernetes-sigs/cluster-api/issues/4856 (I have an open PR to fix it). For now the workaround is to do:

clusterctl init --infrastructure azure -b kubeadm:v0.3.19 -c kubeadm:v0.3.19 --core cluster-api:v0.3.19

Note that you need to use clusterctl v1alpha3 still (latest is v0.3.19) since there are no available releases of v1alpha4 yet (it's coming end of the week).

Sorry for the inconvenience!

Posted about this in slack (https://kubernetes.slack.com/archives/CEX9HENG7/p1624999475300400) for wider awareness

@CecileRobertMichon

For some reason i'm unable to register an account with my email-id on slack. With the recommended work around I get below error.

abhishekr-mbp:~ abhishekr$ clusterctl init --infrastructure azure -b kubeadm:v0.3.19 -c kubeadm:v0.3.19 --core cluster-api:v0.3.19
Fetching providers
Error: failed to get provider components for the "cluster-api:v0.3.19" provider: failed to detect default target namespace: Invalid manifest. There should be no more than one resource with Kind Namespace in the provider components yaml

@abhishek-jnpr make sure you're doing

Note that you need to use clusterctl v1alpha3 still (latest is v0.3.19) since there are no available releases of v1alpha4 yet (it's coming end of the week).

from the error message above it looks like you're still trying to use clusterctl v0.4.0

I was using 0.4.0 as you pointed out, after downgrading to 0.3.19 it started functioning.

This is fixed in clusterctl v0.3.20

/close

@CecileRobertMichon: Closing this issue.

In response to this:

This is fixed in clusterctl v0.3.20

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@CecileRobertMichon The fix works, yet as of today (July 2) the quickstart documentation still refers to version 0.3.19, which of course is broken.

I'm quite new to CAPI & CAPZ so this stumped me for quite a while until I found this issue & the solution.

I looked at the book source and it seems like it should be autogenerating the latest version (the markdown source shows curl -L {{#releaselink gomodule:"sigs.k8s.io/cluster-api" asset:"clusterctl-linux-amd64" version:"0.3.x"}} -o clusterctl, so I'm not sure if something is broken or if the book simply has not updated yet.

Was this page helpful?
0 / 5 - 0 ratings