我正在尝试为Kubernetes仪表板配置SSL。不幸的是,我收到以下错误:
2020/07/16 11:25:44 Creating in-cluster Sidecar client
2020/07/16 11:25:44 Error while loading dashboard server certificates. Reason: open /certs/tls.crt: no such file or directoryvolumeMounts:
- name: certificates
mountPath: /certs
# Create on-disk volume to store exec logs我觉得应该挂载/certs,但应该挂载在哪里呢?
发布于 2020-07-16 21:52:57
证书存储为secrets。然后,可以在deployment中使用和挂载secret。
因此,在您的示例中,它将如下所示:
...
volumeMounts:
- name: certificates
mountPath: /certs
# Create on-disk volume to store exec logs
...
volumes:
- name: certificates
secret:
secretName: certificates
...这只是使用recommended.yaml设置Kubernetes Dashboard v2.0.0的整个过程的一小部分。
如果您使用了recommended.yaml,则会自动创建证书并将其存储在内存中。正在使用args创建部署:-auto-generate-certificates
我也推荐阅读How to expose your Kubernetes Dashboard with cert-manager,因为它可能会对你有所帮助。
已经提交了一个与您的Couldn't read CA certificate: open : no such file or directory #2518类似的问题,但它是关于Kubernetesv1.7.5的
如果您有更多的问题,请让我知道,如果您提供更多详细信息,我将更新答案。
https://stackoverflow.com/questions/62933789
复制相似问题