Kubernetes Pod无法访问HTTPS站点

发布时间:2020-07-07 00:48

只需使用kubespray安装Kubernetes集群。在具有3 master的主节点前面的3 worker个节点和2 haproxy个节点+ keepalived个节点。

除一件事外,其他所有功能都可以正常运行。 当我尝试更新吊舱内alpineubuntu上的包装时:

Ign:1 https://security.debian.org/debian-security buster/updates InRelease          
Ign:2 https://deb.debian.org/debian buster InRelease                                
Err:4 https://security.debian.org/debian-security buster/updates Release                            
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. The name in the certificate does not match the expected.

快速调试显示,我从K8s中的代理服务器获取了自签名的Traefik默认证书

echo | openssl s_client -showcerts -servername gnupg.org -connect gnupg.org:443 2>/dev/null | openssl x509 -inform pem -noout -text

输出:

       Issuer: CN = TRAEFIK DEFAULT CERT
        Validity
            Not Before: Jun 15 14:08:39 2020 GMT
            Not After : Jun 15 14:08:39 2021 GMT
        Subject: CN = TRAEFIK DEFAULT CERT

是否可以禁用SSL终止?

我的安装是来自kubespray分支的master的全新安装

Kubernetes版本:v1.18.5

回答1

/etc/resolv.conf中发现了一个问题。 search列表中有一个域,该域指向带有traefik的服务器。 该域的DNS区域中记录了*.domain.com。那就是问题所在。