Question about ECS Fargate

0

I am trying to deploy my.net core service in a container on AWS ECS, and I want to imply when this service start it will register in my consul server and execute health check, but I can only get my host ip after it is deployed, I can not pass the right host ip address to consul server so that I can not execute health check, is there any way to get host ip from container?

2回答
0
承認された回答

Im guessing you get the container ip and not the host it’s running on?

Is this similar to https://groups.google.com/g/nomad-tool/c/S-MS5sbmzJ0?pli=1

If not you will never get the host IP until It’s deployed is it will be deployed in a cluster.

profile picture
エキスパート
回答済み 1年前
  • Sorry for the late reply, I just find a way to solve this. By using Dns.GetHostEntry(Dns.GetHostName()).AddressList.First(), it can easily get the private IP address of server. At first, I use toString() rather than first().but finally it works. Thank you Again.!!

0

Hello, Do you have all the prerequisites that Consul requires?

https://developer.hashicorp.com/consul/docs/ecs/requirements

AWS
回答済み 1年前
  • Yes, Finally solved problem, thanks your time

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ