List Services

GET {{kube-api-server}}/api/v1/namespaces/default/services?limit=500

This request will list the service created. You should see the following in Visualize

list service

The snippet in the Tests tab will save the external IP for the service to the collection.

const service = pm.response.json().items.filter((item) => item.metadata.name === pm.variables.get("project-name")+"-service")[0]
pm.collectionVariables.set("service-ip", service.status.loadBalancer.ingress[0].hostname)
pm.collectionVariables.set("service-port", service.spec.ports[0].port)

Request Params

KeyDatatypeRequiredDescription
limitnumber