如何从萨格人笔记本中访问IP白名单的API?
我已经在AWS EKS托管的Kubernetes群集中部署了一个烧瓶应用程序及其容器,并且该集群的安全组是IP白名单。
我使用eksctl
创建了集群,为其创建了一个RDS实例,并使用其Helm Chart部署了该应用程序。
我正在尝试从AWS SageMaker笔记本实例中访问烧瓶应用程序的API,但是由于IP白名单,我无法连接。连接时间输出。
谁能告诉我如何将笔记本实例添加到我的白名单中?
I have deployed a Flask application and its containers in an AWS EKS managed Kubernetes cluster, and the cluster's security group is IP whitelist secured.
I created the cluster using eksctl
, created an RDS instance for it, and deployed the application using it's helm chart.
I am trying to access the APIs of the flask application from within a AWS Sagemaker Notebook instance, but because of the IP whitelist, I am unable to connect. The connection times-out instead.
Can anyone tell me how I can add the Notebook instance to my whitelist?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于API是IP白名单,因此您需要将SageMaker实例的公共IP添加到白名单中,以便从笔记本电脑上连接到API。
打开一个sagemaker笔记本实例,然后在单元格中运行以下命令。
!curl ifconfig.me
这将返回一个IP地址,例如
13.232.97.17
。从EC2控制台页面转到群集的安全组。它将具有一个名称,例如
eks-cluster-sg-clusername-uniqueid
。编辑安全组的入站规则,并为SageMaker Notebook实例添加新条目。
并添加适当的描述。
现在,您应该能够通过笔记本访问API。
Since the API is IP whitelist secured, you will need to add the public IP of your Sagemaker instance to the whitelist in order to connect to the API from the notebook.
Open a Sagemaker notebook instance, and run the following command in a cell.
!curl ifconfig.me
This will return an IP address such as
13.232.97.17
.Go to your cluster's security group from EC2 console page. It will have a name such as
eks-cluster-sg-cluserName-uniqueID
.Edit the security group's inbound rules, and add a new entry for the sagemaker notebook instance.
and add an appropriate description.
Now, you should be able to access the API via the notebook.