How to SSH into a POD in order to test a new service using CURL

Hi I faced this scenario different times in some MOCK tests and I am not a linux guy. SO I wonder how to access a pod in order to test s CURL command.

Use for example curl from a temporary nginx:alpine Pod to get the response from the Service . Write the response into a file.

Thanks

Hello, @alcides
In such cases, you can use kubectl exec command. For nginx:alpine pod

kubectl exec -it POD-NAME -- curl <QUERY>

Reference -
https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec