Skip to content

Commit 842a9b6

Browse files
Merge pull request #1733 from erikgb/deleting-leases
Add info about orphaned leases when uninstalling
2 parents 1558363 + aa22011 commit 842a9b6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.spelling

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ kube-ingress-aws-controller
448448
kube-lego
449449
kube-apiserver
450450
kube-proxy
451+
kube-system
451452
tcpdump
452453
kubebuilder
453454
kubectl

content/docs/installation/kubectl.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,19 @@ Delete the installation manifests using a link to your currently running version
195195
kubectl delete -f https://github.com/cert-manager/cert-manager/releases/download/vX.Y.Z/cert-manager.yaml
196196
```
197197

198+
### Deleting orphaned leases
199+
200+
Note: cert-manager uses Kubernetes [`Lease`](https://kubernetes.io/docs/concepts/architecture/leases/)
201+
objects for leader election, which is enabled by default.
202+
These leases are typically created in the kube-system namespace, but the namespace can be configured.
203+
They are not automatically removed when uninstalling cert-manager. You can safely delete them manually:
204+
205+
```bash
206+
kubectl delete lease -n <namespace> cert-manager-cainjector-leader-election cert-manager-controller
207+
```
208+
209+
Replace `<namespace>` with the namespace where leader election leases were created (default is kube-system).
210+
198211
### Namespace Stuck in Terminating State
199212

200213
If the namespace has been marked for deletion without deleting the cert-manager

0 commit comments

Comments
 (0)