Skip to content

Instantly share code, notes, and snippets.

@MaxRink
Created June 17, 2020 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaxRink/3ab5be19464b81f0b1d027f24dddb7f7 to your computer and use it in GitHub Desktop.
Save MaxRink/3ab5be19464b81f0b1d027f24dddb7f7 to your computer and use it in GitHub Desktop.
Clusterctl N-Infra Workflow

We have an N-Infa-Setup like this:

Management group: capi-system/cluster-api, latest release available for the v1alpha3 API Version of Cluster API (contract):

NAME                     NAMESPACE                           TYPE                     CURRENT VERSION   NEXT VERSION
bootstrap-kubeadm        capi-kubeadm-bootstrap-system       BootstrapProvider        v0.3.6            Already up to date
control-plane-kubeadm    capi-kubeadm-control-plane-system   ControlPlaneProvider     v0.3.6            Already up to date
cluster-api              capi-system                         CoreProvider             v0.3.6            Already up to date
infrastructure-vsphere   capv-system-bremen                  InfrastructureProvider   v0.6.5            Already up to date
infrastructure-vsphere   capv-system-demo                    InfrastructureProvider   v0.6.5            Already up to date
infrastructure-vsphere   capv-system-refsaone                InfrastructureProvider   v0.6.5            Already up to date

Each of the Infra Providers has its own set of clusterctl config, as the vsphere credentials differ from provider to provider

Now we want to upgrade each provider converving its config, and i havent found a way to do so Trys were:

clusterctl upgrade plan --kubeconfig mgmt-capi-cluster-1.kubeconfig --config .cluster-api/clusterctl-bremen.yaml
clusterctl upgrade apply -i capv-system-demo/infrastructure-vsphere --kubeconfig mgmt-capi-cluster-1.kubeconfig --config .cluster-api/clusterctl-bremen.yaml

Which didnt work

@fabriziopandini
Copy link

could you attach the output of clusterctl upgrade plan?

@MaxRink
Copy link
Author

MaxRink commented Jun 17, 2020

clusterctl upgrade plan --kubeconfig mgmt-capi-cluster-1.kubeconfig --config .cluster-api/clusterctl-bremen.yaml
Checking new release availability...

Management group: capi-system/cluster-api, latest release available for the v1alpha3 API Version of Cluster API (contract):

NAME                     NAMESPACE                           TYPE                     CURRENT VERSION   NEXT VERSION
bootstrap-kubeadm        capi-kubeadm-bootstrap-system       BootstrapProvider        v0.3.6            Already up to date
control-plane-kubeadm    capi-kubeadm-control-plane-system   ControlPlaneProvider     v0.3.6            Already up to date
cluster-api              capi-system                         CoreProvider             v0.3.6            Already up to date
infrastructure-vsphere   capv-system-bremen                  InfrastructureProvider   v0.6.5            Already up to date
infrastructure-vsphere   capv-system-demo                    InfrastructureProvider   v0.6.5            Already up to date
infrastructure-vsphere   capv-system-refsaone                InfrastructureProvider   v0.6.5            Already up to date

You are already up to date!

@fabriziopandini
Copy link

You should try

1. first update the CAPI providers one by one

set env variables for CAPI providers

clusterctl upgrade apply  --management-group capi-system/cluster-api  --core capi-system/cluster-api:v0.3.6
clusterctl upgrade apply  --management-group capi-system/cluster-api  -b capi-kubeadm-bootstrap-system/bootstrap-kubeadm:v0.3.6
clusterctl upgrade apply  --management-group capi-system/cluster-api  -c capi-kubeadm-control-plane-system/control-plane-kubeadm:v0.3.6

2. then update the vsphere providers one by one (changing env variables for each instance)

set env variables for capv-system-bremen

clusterctl upgrade apply  --management-group capi-system/cluster-api  -i capv-system-bremen/infrastructure-vsphere:v0.6.5

set env variables for capv-system-demo

clusterctl upgrade apply  --management-group capi-system/cluster-api  -i capv-system-demo/infrastructure-vsphere:v0.6.5

set env variables for capv-system-refsaone

clusterctl upgrade apply  --management-group capi-system/cluster-api  -i capv-system-refsaone/infrastructure-vsphere:v0.6.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment