【问题标题】:How to enable https on cri-o socket metrics如何在 cri-o 套接字指标上启用 https
【发布时间】:2021-09-28 22:22:17
【问题描述】:

我正在关注文档CRI-O Metrics。我可以获得指标,例如http://hostname:port/metrics 但与 https://hostname:port/metrics 上的预期不同

我的配置文件示例:

$ cat /etc/crio/crio.conf.d/01-metrics.conf
[crio.metrics]
enable_metrics = true
metrics_port = 5555
metrics_cert = "/etc/crio/certs/cert.crt"
metrics_key = "/etc/crio/certs/key.crt"

文件的权限为644。示例:

$ ls -la /etc/crio/certs/
total 20
drwxr-xr-x. 2 root root    37 Jul 21 16:19 .
drwxr-xr-x. 4 root root    55 Jul 21 16:08 ..
-rw-r--r--. 1 root root 12975 Jul 21 15:49 cert.crt
-rw-r--r--. 1 root root  1872 Jul 21 15:49 key.crt

是否需要启用任何其他配置才能使套接字使用 https 而不是 http?

更新:我正在运行的 CRI-O 版本是最新的稳定版(在提出问题时):

$ crio -v
INFO[0000] Starting CRI-O, version: 1.20.3, git: 50065140109e8dc4b8fd6dc5d2b587e5cb7ed79d(dirty)
crio version 1.20.3
Version:       1.20.3
GitCommit:     50065140109e8dc4b8fd6dc5d2b587e5cb7ed79d
GitTreeState:  dirty
BuildDate:     1980-01-01T00:00:00Z
GoVersion:     go1.15.7
Compiler:      gc
Platform:      linux/amd64
Linkmode:      static

【问题讨论】:

    标签: cri-o


    【解决方案1】:

    似乎该功能(CRI-O 套接字在 https 上运行以获取指标的能力)仅适用于 1.22 及更高版本(参考 CRI-O 1.20.3 metrics does not run on https (based on documentation settings) #5112

    所以看来这个功能在1.20.3版本上是不能应用的。

    【讨论】:

      猜你喜欢
      • 2020-08-28
      • 2017-10-07
      • 2020-01-12
      • 1970-01-01
      • 2020-03-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-20
      相关资源
      最近更新 更多