I have installed cert manager according to the documentation using Helm. After installation I am able to get certificates using Ingress too. But after getting certificate I am unable to describe, delete to perform any other option on certificate or any other cert manager resources. I get following error
kubectl describe certificate cert-name
Error from server: conversion webhook for cert-manager.io/v1alpha2, Kind=Certificate failed: Post https://cert-manager-webhook.cert-manager.svc:443/convert?timeout=30s: service "cert-manager-webhook" not found
How to fix this issue?
Edit Including status of cert manager
NAME READY STATUS RESTARTS AGE
pod/certs-cert-manager-6d96b77bd5-9jmpc 1/1 Running 0 3h13m
pod/certs-cert-manager-cainjector-7658745698-rrz2v 1/1 Running 0 3h13m
pod/certs-cert-manager-webhook-84f76cc797-49j99 1/1 Running 0 3h13m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/certs-cert-manager ClusterIP 10.245.133.177 <none> 9402/TCP 69d
service/certs-cert-manager-webhook ClusterIP 10.245.11.233 <none> 443/TCP 3h13m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/certs-cert-manager 1/1 1 1 69d
deployment.apps/certs-cert-manager-cainjector 1/1 1 1 69d
deployment.apps/certs-cert-manager-webhook 1/1 1 1 69d
NAME DESIRED CURRENT READY AGE
replicaset.apps/certs-cert-manager-5d66886cc 0 0 0 3h14m
replicaset.apps/certs-cert-manager-5f797cf4fc 0 0 0 69d
replicaset.apps/certs-cert-manager-6d96b77bd5 1 1 1 3h13m
replicaset.apps/certs-cert-manager-cainjector-7658745698 1 1 1 3h13m
replicaset.apps/certs-cert-manager-cainjector-9d7d6bb5b 0 0 0 69d
replicaset.apps/certs-cert-manager-webhook-7946b5dbbd 0 0 0 69d
replicaset.apps/certs-cert-manager-webhook-84f76cc797 1 1 1 3h13m
From the error it's looking for a service with name cert-manager-webhook.cert-manager
but the service name is actually certs-cert-manager-webhook.cert-manager
. I think while installing using helm you gave it some name other than cert-manager
which may be causing the problem.
Use exactly the below commands without changing the name and see if that works.
# Helm v3+
$ helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--version v0.15.1 \
# --set installCRDs=true
# Helm v2
$ helm install \
--name cert-manager \
--namespace cert-manager \
--version v0.15.1 \
jetstack/cert-manager \
# --set installCRDs=true