【问题标题】:Kubectl: Accessing the AKS (Kubernetes) public API endpoint through a corporate SSL-aware proxyKubectl:通过企业 SSL 感知代理访问 AKS (Kubernetes) 公共 API 端点
【发布时间】:2019-05-06 16:21:46
【问题描述】:
有没有人成功地让 kubectl 从执行 SSL 检查的公司代理后面连接到其 AKS 集群的 AKS 公共 API 端点?
当我尝试做类似的事情时
kubectl get nodes
我收到以下错误:(已编辑)
Unable to connect to the server: x509: certificate signed by unknown authority
看来我的公司代理进行了 SSL 检查。
我的问题是:是否可以通过干扰 SSL 的代理(通过另一个“帮助代理”或其他方法)通过 HTTPS 通过 HTTPS 访问 AKS 公共 API?
【问题讨论】:
标签:
networking
kubernetes
proxy
kubectl
azure-aks
【解决方案1】:
如果您的公司代理执行 TLS 重新加密并将自己的证书注入 TLS 连接,您可以执行以下操作:
1) 提取您的公司 TLS 证书并将其粘贴到您的 ~/.kube/config 中。为此,您需要使用例如此命令获取公司证书
openssl s_client -showcerts -connect KUBE_API:443
2) 在 ~/.kube/config 中跳过 TLS 证书验证
apiVersion: v1
clusters:
- cluster:
server: https://KUBE_API:8443
insecure-skip-tls-verify: true