0

I have to upgrade cert-manager on GKE cluster and due to the big version gap I have to uninstall and re-install it. Basically, I am wondering how should I uninstall it and since I installed it through kustomization file I thought I will do the same with the uninstallation. The question is: is it possible or not?

I also want to know if I can delete the manifests all together or there's an order? eg: delete controller before deleting the CRDs.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - crds/clusterissuers.crd.yaml
  - crds/issuers.crd.yaml
  - crds/challenges.crd.yaml
  - crds/certificaterequests.crd.yaml
  - crds/orders.crd.yaml
  - crds/certificates.crd.yaml


  - operator/cainjector
  - operator/webhook
  - operator/controller
Wijxex
  • 13
  • 1
  • 4
  • How did you apply the manifests you built with kustomize? – jordanm Sep 20 '22 at 02:16
  • To build manifests, I run the docker image : docker run --mount src=,target=/path,type=bind \ --mount src=,target=/var/google/credentials.json,type=bind \ -it \ eu.gcr.io/workspace/kustomize \ /path/ – Wijxex Sep 20 '22 at 08:15
  • What commands to run within the docker container? Are you doing `kustomize build` followed by `kubectl apply -f`? – jordanm Sep 20 '22 at 14:33
  • yes! that's the way – Wijxex Sep 21 '22 at 09:03

1 Answers1

2

You should be able to uninstall it by running kustomize build 'folder' | kubectl delete -f -.

Kustomize will remove the resources in order, so I would remove first the operators and later the CRDs as cleanup.