Azure-AKS:使用Postman测试启用TLS的入口 [英] Azure-AKS: Test TLS enabled Ingress using Postman
问题描述
我指的是按照以下文档创建HTTPS入口控制器(使用我自己的TLS证书).
我不明白如何测试来自POSTMAN的以下curl请求.
I am referring to following document to create an HTTPS ingress controller( use my own TLS certificates ).
I can't understand how do I test the below curl request from the POSTMAN.
curl -v -k --resolve demo.azure.com:443:EXTERNAL_IP https://demo.azure.com
推荐答案
将此答案作为社区Wiki发布,以使注释中的github问题以及潜在的解决方法更具可见性.
Posting this answer as a community wiki to give more visibility on the github issue in the comments as well as potential workarounds.
随时进行扩展/编辑.
如github问题中所述:
As pointed in the github issue:
我正在寻找能够将GET请求发送到特定主机的请求,而不是请求中指定的主机名.使用一个简单的示例-假设 www.mysite.com 解析为1.1.1.1;我希望将GET www.mysite.com 发送到2.2.2.2,而不必修改主机文件.实际上,在使用curl --resolve时,我正在寻找相同的结果.邮递员有可能吗?
I'm looking for being able to send a GET request to a specific host, other than the hostname specified in the request. To use a quick example - assume www.mysite.com resolves to 1.1.1.1; I'd like for the GET www.mysite.com to be sent to 2.2.2.2 instead, without having to modify the hosts file. In effect, I'm looking for the same outcome when using curl --resolve. Is this possible with Postman ?
当前不支持自定义分辨率.我们会将其作为功能请求进行跟踪,并在此处发布所有更新.
可以看出此功能尚不支持.
As it can be seen this feature is not yet supported.
作为一种变通办法,您可以尝试(如github问题中所述):
As a workaround measure you could try to (as pointed in the github issue):
- 修改操作系统的
hosts
文件(取决于您的操作系统,它可以是:/etc/hosts
或C:\ Windows \ System32 \Drivers \ etc \ hosts
)将域解析设置为您的Ingress控制器
的外部ip地址
- Modify the
hosts
file of your operating system (depending on your os it could be either:/etc/hosts
orC:\Windows\System32\Drivers\etc\hosts
) to set the domain resolution to the external ip address of yourIngress controller
EXTERNAL_IP DOMAIN.NAME
- 使用
Postman
将请求发送到DOMAIN.NAME
,然后检查您的Ingress控制器
是否以自签名进行响应
证书. - Use
Postman
to send the request to theDOMAIN.NAME
and check if yourIngress controller
respond with theself-signed
certificate.
其他资源:
这篇关于Azure-AKS:使用Postman测试启用TLS的入口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!