Consul Helm TLS错误:签名密钥的PEM块类型未知:CERTIFICATE



我正在努力理解这个错误。我正在部署带有TLS和Consul服务器和客户端的Consul。在tls-init容器上,我得到了这个错误。

kubectl logs consul-consul-tls-init-b2rfv
==> WARNING: Server Certificates grants authority to become a
server and access all state in the cluster including root keys
and all ACL tokens. Do not distribute them to production hosts
that are not server nodes. Store them as securely as CA keys.
==> Using /consul/tls/ca/cert/tls.crt and /consul/tls/ca/key/tls.key
unknown PEM block type for signing key: CERTIFICATE

我已经尝试通过多种方式创建CA证书和密钥。首先我尝试了openssl,然后我尝试了cfssl,最后我尝试了客户端consul。都是同样的错误。

据我所知,这些秘密的数量越来越多。这是我的values.yaml的一个例子,我正在通过掌舵人3部署领事。

global:
gossipEncryption:
secretName: "gossip"
secretKey: "key"
tls:
enabled: true
verify: false # only for troubleshooting hoping it would help, also tried with true
caCert:
secretName: "consul-tls-ca"
secretKey: "tls.crt"
caKey:
secretName: "consul-server-tls"
secretKey: "tls.crt"

我如何创建八卦和tls秘密的示例

export GOSSIP_ENCRYPTION_KEY=$(consul keygen)
kubectl create secret generic gossip --from-literal="key=${GOSSIP_ENCRYPTION_KEY}"
kubectl create secret generic consul-tls-ca --from-file="tls.crt=./ca.pem"
kubectl create secret generic consul-server-tls --from-file="tls.crt=./server.pem" --from-file="tls.key=./server-key.pem"

我没有通过谷歌或搜索SO从其他人那里发现任何类似的报告错误。Hashicorps文档对此只字未提,或者我没有找到。

他们在consul 1.10中修复了它——以前它只知道ECP证书。更多https://github.com/hashicorp/consul/issues/7622

最新更新