0

I am trying to test an outbound connection from within a Amazon Linux 2 container that is running in Kubernetes. I have a service set up and I am able to telnet to that service through a VPN. But I want to test a connection coming out from that container. Is there a way that this can be done. I have tried the ping, etc. but the commands all say "command not found"

Is there any command I can run that can test an outbound connection?

Gene Smith
  • 169
  • 12

1 Answers1

1

Please provide more context. What exact image are you running? When debugging connectivity of kubernetes pods and services, you can exec into the pod with

kubectl exec -it <pod_name> -n <namespace> -- <bash|ash|sh> 

Once you gain access to the pod and can emulate a shell inside, you can update + upgrade the runtime with the package manager (apt, yum, depends on the distro).

After upgrading, you can install curl and try to curl an external site.

Pavol Krajkovič
  • 505
  • 1
  • 12
  • Thanks that is exactly what I was looking for. I was exec'd in the pod, but I was not sure on the package manager to use. It was yum. The distro is "Amazon Linux 2" by the way. P.S. I was able to telnet and ping out to my on-premises network through the VPN. – Gene Smith Aug 12 '22 at 06:59