错误:解析ssl2.yaml时发生错误:将YAML转换为JSON时发生错误:yaml:第22行:找不到预期的密钥

时间:2019-10-29 14:42:43

标签: kubernetes

  

错误:解析ssl2.yaml时发生错误:将YAML转换为JSON时发生错误:yaml:   第22行:找不到预期的密钥

apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
  name: ambassador-certs
  # cert-manager will put the resulting Secret in the same Kubernetes namespace
  # as the Certificate. Therefore you should put this Certificate in the same namespace as Ambassador.
  # eg. if you deploy ambassador to ambassador namespace, you need to change to namespace: ambassador
  namespace: default
spec:
  # naming the secret name certificate ambassador-certs is important because
  # ambassador just look for this particular name
  secretName: ambassador-certs
  issuerRef:
    name: letsencrypt-prod
    kind: ClusterIssuer
  dnsNames:
  - mikiwiki.es
  acme:
    config:
    - http01:
        ingressClass: nginx
      domains:
     - mikiwiki.es

2 个答案:

答案 0 :(得分:0)

最后一行出现indentation错误。

只需再添加一个空间:

      domains:
      - mikiwiki.es

答案 1 :(得分:0)

您可以参阅this stackoverflow帖子。

您可以从here安装jetstack,一旦DNS验证,它将自动生成证书中提到的TLS证书