Interacting with your Service

Service-Specific Dashboard

To access the dedicated dashboard for your service, click its name.

Pause / Resume your Service

Pausing a service means that all replicas of your Service will be shut down, and your service will no longer consume any resources or serve requests - hence saving costs. This can be useful for dev environments when you don't want to run the service but also don't want to delete the configuration since it might be used later.

Pause a Service

📘

Note:

If you have Autoscaling enabled for your service the option to pause a service will not be available to you.

Resuming a Service

Copy Endpoint URL

To make a request to the Service, you will need the Endpoint URL.

The endpoint URL is the same one you provided while deploying the service in the Ports Section. You can also copy it from the Service UI.

The endpoint will be an internal cluster URL or an external URL based on whether you chose Expose in the Ports configuration. The two cases are as follows:

The service port is exposed and mapped to a domain

In this case, this becomes a public endpoint and you can call this service from anywhere - your own laptop or code running anywhere.

You can add username-password-based authentication to the API in case you don't want everyone to be able to call this API. For this, you can refer to the following section Add Authentication to Endpoint.

The service port is not exposed

If you have not exposed the port, the endpoint is internal to the cluster and can only be called by other services running in the same cluster (including Jupyter Notebooks running in the same cluster). No one externally can access this service and this is the recommended mode for APIs that don't need to be exposed for external usage. These APIs will be of the format servicename-workspacename.svc.cluster.local:port

Sending Requests to your Service

Once you deploy the service, you will want to interact with the API in your code or manually using curl or Postman or Python code as shown below:

import json  
from urllib.parse import urljoin

import requests

# Replace this with the value of your endpoint URL

ENDPOINT_URL = "\<YOUR_ENDPOINT_URL>"  # e.g., https://your-service-endpoint.com

response = requests.post(  
    urljoin(ENDPOINT_URL, 'predict'),  
    params={  
        "sepal_length": 7.0,  
        "sepal_width": 3.2,  
        "petal_length": 4.7,  
        "petal_width": 1.4,  
    }  
)

result = response.json()  
print("Predicted Classes:", result["prediction"])