首页 > 解决方案 > 从 Helm stable/cert-manager 升级到 jetstack/cert-manager

问题描述

我们有一个生产 AKS 集群,该集群stable/cert-manager安装了 helm 图表以允许使用 Let's Encrypt 证书。当前安装的版本cert-manager-v0.6.0位于kube-system命名空间中。

Let's Encrypt 将从 2019 年 11 月 1 日起停止对来自 cert-manager pre 8.0 版本的流量的支持。

我想升级,但最新可用的stable图表版本是v0.6.7. 似乎要走的路是切换到jetstack/cert-manager.

我如何最好地解决这个问题?我应该卸载当前stable/cert-manager图表并使用jetstack/cert-manager? 任何关于如何在不停机的情况下解决这个问题的资源将不胜感激。如果我可以提供更多详细信息,请告诉我。

标签: kuberneteskubernetes-helmlets-encryptazure-akscert-manager

解决方案


对于任何问同样问题的人,我都尝试在我的测试集群上执行全新安装,这似乎工作得相当顺利。我通过运行找到了我的掌舵版本的名称helm list

然后我执行了以下步骤:

1.备份

kubectl get -o yaml \
   --all-namespaces \
   issuer,clusterissuer,certificates,orders,challenges > cert-manager-backup.yaml

来源

2.删除

# Uninstall the Helm chart
helm delete --purge <your release name here>

# Ensure the cert-manager CustomResourceDefinition resources do not exist:
kubectl delete crd \
    certificates.certmanager.k8s.io \
    issuers.certmanager.k8s.io \
    clusterissuers.certmanager.k8s.io

在此处的第 2 步中描述

3.安装一个新的jetstack版本

# Install the CustomResourceDefinition resources separately
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.9/deploy/manifests/00-crds.yaml

# Create the namespace for cert-manager
kubectl create namespace cert-manager

# Label the cert-manager namespace to disable resource validation
kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true

# Add the Jetstack Helm repository
helm repo add jetstack https://charts.jetstack.io

# Update your local Helm chart repository cache
helm repo update

# Install the cert-manager Helm chart
helm install --name <your release name here> --namespace cert-manager --version v0.9.1 jetstack/cert-manager

这里描述

4.恢复

我试过跑步

kubectl apply -f cert-manager-backup.yaml

如此处所述但此步骤实际上并没有完全适合我。发行人已创建(自签名和 CA),但我无法重新创建Certificatesand ClusterIssuer。这些是我收到的错误:

Error from server (InternalError): Internal error occurred: failed calling webhook "clusterissuers.admission.certmanager.k8s.io": the server is currently unable to handle the request
Error from server (InternalError): Internal error occurred: failed calling webhook "certificates.admission.certmanager.k8s.io": the server is currently unable to handle the request

我有我的原始yaml文件,并且能够通过应用它们来创建ClusterIssuerCertificate


推荐阅读