Ошибка "проблема с сертификатом SSL" при использовании toKubelet API

У Kubelet есть API, и я хотел его протестировать.
Вы видите его API с веб-сайта Kubernetes или с открытым исходным кодом, чтобы увидеть его API.

Я хотел проверить /metrics API.
Изнутри рабочего я побежал:

curl --cacert "/etc/kubernetes/pki/ca.crt" \
--cert '/var/lib/kubelet/pki/kubelet.crt' \
--key '/var/lib/kubelet/pki/kubelet.key' \
-vv -H "Content-Type: application/json" https://172.31.29.121:10250/metrics

Я получил ошибку о сертификате, но не понял почему?
Может быть, я не использую правильные сертификаты?

Полная информация:

*   Trying 172.31.29.121...
* TCP_NODELAY set
* Connected to 172.31.29.121 (172.31.29.121) port 10250 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/kubernetes/pki/ca.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS alert, Server hello (2):
* SSL certificate problem: self signed certificate in certificate chain
* stopped the pause stream!
* Closing connection 0
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

0 ответов

Другие вопросы по тегам