大网数据广告活动
服务器运维问答

How to solve "Bad Certificate" error on kubernetes pod?

· 52CE 我爱测

I am trying to set up a kubernetes pod in order for it to connect to a device, specifically a F5 BIG-IP appliance. The deployment appears to be OK, in fact i had to modify a code snippet I found online. When the pods is trying to…

问题原文

原帖链接 · Alessandro · CC BY-SA 4.0

I am trying to set up a kubernetes pod in order for it to connect to a device, specifically a F5 BIG-IP appliance.

The deployment appears to be OK, in fact i had to modify a code snippet I found online.

When the pods is trying to start up, i got an error. So I started my investigation:

Running kubectl logs <pod_name> -n <namespace> returns an error:

REST call error: Get <URL>: x509: cannot validate certificate for <IP> because it doesn't contain any IP SANs

By looking at a wireshark dump on the interface, I se that there's a TLS 1.2 alert (fatal) with a description of "bad certificate" sent from the client to the server.

So I looked online, and I found some articles saying it's a problem with kubernetes trying to connect to the server but not recognizing it - at least I think that's what they meant. One of the suggested workarounds was to apply a DNS name, so I modified the /etc/hosts file in order to use the DNS name within the deployment YAML file.

The result is that the error message changes to:

REST call error: Get <URL>: dial tcp: lookup <hostname>: device or resource busy

Any ideas on what the problem might be and how to solve it?

This is a test environment so I wouldn't mind -let me say- "unorthodox" methods, such as ignoring the certificate check, but I'd appreciate it if there were solutions or workarounds which I could eventually bring into production.

Thanks for any input you might have.

已采纳解答

原帖链接 · Alessandro · CC BY-SA 4.0

I found the issue. It appears that within the deployment YAML file it was possible to set a --insecure=true flag. This forced the device to not check the certificate, and successfully connect to the F5 appliance.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-06-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。