Skip to content

Commit e2aafb6

Browse files
authored
Merge pull request #6052 from k8s-infra-cherrypick-robot/cherry-pick-6050-to-release-1.1
🐛 Fix cert manager repo and add troubleshooting guide
2 parents 33eb755 + 7efd2b9 commit e2aafb6

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

cmd/clusterctl/client/config/cert_manager_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const (
3232
// CertManagerDefaultURL defines the default cert-manager repository url to be used by clusterctl.
3333
// NOTE: At runtime /latest will be replaced with the CertManagerDefaultVersion or with the
3434
// version defined by the user in the clusterctl configuration file.
35-
CertManagerDefaultURL = "https://github.com/jetstack/cert-manager/releases/latest/cert-manager.yaml"
35+
CertManagerDefaultURL = "https://github.com/cert-manager/cert-manager/releases/latest/cert-manager.yaml"
3636

3737
// CertManagerDefaultTimeout defines the default cert-manager timeout to be used by clusterctl.
3838
CertManagerDefaultTimeout = 10 * time.Minute

docs/book/src/user/troubleshooting.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,28 @@ exit
7373
```
7474

7575
Note: This error was observed in Docker 4.3. An alternative solution is to stick with an older version of Docker Desktop while this issue is being resolved. [An issue is currently open on the Docker Desktop repository.](https://github.com/docker/for-mac/issues/6071)
76+
77+
## Failed clusterctl init - 'failed to get cert-manager object'
78+
79+
When using older versions of Cluster API 0.4 and 1.0 releases - 0.4.6, 1.0.3 and older respectively - Cert Manager may not be downloadable due to a change in the repository location. This will cause `clusterctl init` to fail with the error:
80+
81+
```bash
82+
$ cluster-api % clusterctl init --infrastructure docker
83+
84+
Fetching providers
85+
Installing cert-manager Version="v1.5.3"
86+
Error: action failed after 10 attempts: failed to get cert-manager object /, Kind=, /: Object 'Kind' is missing in 'unstructured object has no kind'
87+
```
88+
89+
This error was fixed in more recent Cluster API releases on the 0.4 and 1.0 release branches. The simplest way to resolve the issue is to upgrade to a newer version of Cluster API for a given release. For who need to continue using an older release it is possible to override the repository used by `clusterctl init` in the clusterctl config file. The default location of this file is in `~/.cluster-api/clusterctl.yaml`.
90+
91+
To do so add the following to the file:
92+
```yaml
93+
cert-manager:
94+
url: "https://github.com/cert-manager/cert-manager/releases/latest/cert-manager.yaml"
95+
```
96+
97+
Alternatively a Cert Manager yaml file can be placed in the [clusterctl overrides layer](../clusterctl/configuration.md#overrides-layer) which is by default in `$HOME/.cluster-api/overrides`. A Cert Manager yaml file can be placed at `$(HOME)/.cluster-api/overrides/cert-manager/v1.5.3/cert-manager.yaml`
98+
99+
More information on the clusterctl config file can be found at [its page in the book](../clusterctl/configuration.md#clusterctl-configuration-file)
100+

0 commit comments

Comments
 (0)