Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to curl a service inside a pod in kubernetes?

# Create a pod which here's named curl

kubectl curl --image=radial/busyboxplus:curl -it

# It will show a command prompt. Then run:

curl [your_service_name]

# After this, to repeat the curl, you just need to:

kubectl exec -it curl -- /bin/sh

# And make the curl [your_service_name]

# When finished, delete the pod:

kubectl delete pod curl
Source by academy.tetrate.io #
 
PREVIOUS NEXT
Tagged: #curl #service #pod
ADD COMMENT
Topic
Name
9+5 =