'Curl request to a Kubernetes cluster type service
I am trying to send a curl request to a Kubernetes ClusterType service. Is there any way to perform curl requests to service?
I am deploying an application with Blue/Green deployment. So here need to verify the Blue version is properly working or not. So decide to send a curl request to the blue version. When I get 200 status, I will route all traffic to this version.
But now am facing that send curl request to the new version(Blue version) of the application.
Solution 1:[1]
You can't send a curl request to ClusterType Service, unless you are inside the cluster, you can run a pod to do that e.g
kubectl run --rm --image nginx -i -- curl 'http://clusterip/'
This will run a temp pod to run your command and die afterward.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Lei Yang |
