How to ping from .net application container

Sometimes in order to debug kubernetes internal network configuration, the simplest way is to use legacy tools. Let's see how quick it can be done in pod.

Just place it here so next time I will not need to search for.

Many time in order to debug network connectivity between pods we use standard network tools such as ping utility.

Docker images in order to reduce size usually shipped without them. In order to run ping command you will need to install the utility first.

If you are developing .net applications you are probably familiar with mcr.microsoft.com/dotnet/sdk:7.0 image, which or its variations are used for shipping .net dockerized applications.

For ubuntu based image run the following to install ping utility:

apt-get update -y
apt-get install -y iputils-ping

Full list of tags and OS versions cna be found here

Facing a similar decision?

Tell me what you're working on. We'll start from the problem, not a service package.

Discuss your challenge