我无法使用cert-manager创建证书。
我正在遵循这个指南https://docs.cert-manager.io/en/latest/getting-started/install/kubernetes.html
这是可行的:
antonswanevelder$ kubectl get pods --namespace cert-manager
NAME READY STATUS RESTARTS AGE
cert-manager-69b4f77ffc-4296b 1/1 Running 0 9m5s
cert-manager-cainjector-576978ffc8-2mxz6 1/1 Running 0 2d13h
cert-manager-webhook-c67fbc858-sdjff 1/1 Running 1 2d13h但是运行测试
kubectl describe certificate -n cert-manager-test不会产生任何结果。
你知道我该怎么解决这个问题吗?
发布于 2019-11-11 17:11:07
重新创建K8s集群,并按照上面证书管理器页面中的步骤进行操作。我犯的一个主要错误是在我的Ingress中引用了错误的名称空间。
请注意使用cert-manager.io/cluster-issuer
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
# add an annotation indicating the issuer to use.
cert-manager.io/cluster-issuer: letsencrypt-prod还要注意在使用证书管理器的v11时,apiVersion和求解器中的细微变化。
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
# You must replace this email address with your own.
# Let's Encrypt will use this to contact you about expiring
# certificates, and issues related to your account.
email: youremail@domain.com
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
# Secret resource used to store the account's private key.
name: letsencrypt-prod
# Add a single challenge solver, HTTP01 using nginx
solvers:
- http01:
ingress:
class: nginx最后,可能值得注意的是,为了提供证书,Lets encrypt需要指向有效的页面。确保正确指向您的域,并且在该域的根目录中提供页面。prod上有一个速率限制器,所以最好与临时颁发者一起工作,直到提供证书为止。如果你运行下面的代码,它应该会显示CertificateCreated。
kubectl describe ingresshttps://stackoverflow.com/questions/58776873
复制相似问题