Skip to content

Commit d86134c

Browse files
authored
Merge pull request #6105 from fabriziopandini/document-clusterctl-pinning-version
📖 Improve documentation for clusterctl pinning version
2 parents b411925 + 58ac2d9 commit d86134c

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

docs/book/src/clusterctl/commands/init.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ for each selected provider.
6262

6363
You can specify the provider version by appending a version tag to the provider name, e.g. `aws:v0.4.1`.
6464

65+
Pinning the version provides better control over what clusterctl chooses to install
66+
(usually required in an enterprise environment). Version pinning should always be used when using [image overrides](../configuration.md#image-overrides), or when relying on internal repositories with a separated
67+
software supply chain, or a custom versioning schema.
68+
6569
</aside>
6670

6771
<aside class="note">

docs/book/src/clusterctl/configuration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ overridesFolder: /Users/foobar/workspace/dev-releases
170170
Image override is an advanced feature and wrong configuration can easily lead to non-functional clusters.
171171
It's strongly recommended to test configurations on dev/test environments before using this functionality in production.
172172
173+
This feature must always be used in conjunction with
174+
[version tag](commands/init.md#provider-version) when executing clusterctl commands.
175+
173176
</aside>
174177
175178
When working in air-gapped environments, it's necessary to alter the manifests to be installed in order to pull

docs/book/src/user/troubleshooting.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,26 @@ Alternatively a Cert Manager yaml file can be placed in the [clusterctl override
104104

105105
More information on the clusterctl config file can be found at [its page in the book](../clusterctl/configuration.md#clusterctl-configuration-file)
106106

107+
## Clusterctl failing to start providers due to outdated image overrides
108+
109+
clusterctl allows users to configure [image overrides](../clusterctl/configuration.md#image-overrides) via the clusterctl config file.
110+
However, when the image override is pinning a provider image to a specific version, it could happen that this
111+
conflicts with clusterctl behavior of picking the latest version of a provider.
112+
113+
E.g., if you are pinning KCP images to version v1.0.2 but then clusterctl init fetches yamls for version v1.1.0 or greater KCP will
114+
fail to start with the following error:
115+
116+
```
117+
invalid argument "ClusterTopology=false,KubeadmBootstrapFormatIgnition=false" for "--feature-gates" flag: unrecognized feature gate: KubeadmBootstrapFormatIgnition
118+
```
119+
120+
In order to solve this problem you should specify the version of the provider you are installing by appending a
121+
version tag to the provider name:
122+
123+
```shell
124+
clusterctl init -b kubeadm:v1.0.2 -c kubeadm:v1.0.2 --core cluster-api:v1.0.2 -i docker:v1.0.2
125+
```
126+
127+
Even if slightly verbose, pinning the version provides a better control over what is installed, as usually
128+
required in an enterprise environment, especially if you rely on an internal repository with a separated
129+
software supply chain or a custom versioning schema.

0 commit comments

Comments
 (0)