Home > Blockchain >  Testing connection out from within running container. Kubernetes. Amazon Linux 2
Testing connection out from within running container. Kubernetes. Amazon Linux 2

Time:08-12

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?

CodePudding user response:

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.

  • Related