When does IP of pod change?

When does the IP of the pod changes? Does it change when we restart/pause the pod or only when we delete and create the new pod? Is there any option to get a static IP for the pod? We are planning to deploy an inference API on pod on a trial basis.
6 Replies
digigoblin
digigoblin2w ago
There is no static IPs. IPs are shared between pods and mapped to pods using port forwarding so the ports will always change and not be static. You can use the GraphQL API to determine the port mapping. For API inference, you should be looking at RunPod Serverless instead of pods, then you don't need to worry about static IPs, because RunPod already provide the API layer for you.
Vaibhav
Vaibhav2w ago
Serverless is indeed a good option, but cost-wise pods are cheaper that's why we are considering them. Thanks for the suggestion though. Any other solution that might come to your mind?
nerdylive
nerdylive2w ago
You can get the pod ID from env and make the url for yourself with the port Are you using tcp or http connection?
Vaibhav
Vaibhav2w ago
http
nerdylive
nerdylive2w ago
Yeah there's a specific url made by pod ID and port for it Try the connect button
Vaibhav
Vaibhav2w ago
Okay, will try it. Thanks.