Publish a Service
Use a ServiceExporter resource to publish a VKS service to the public network
A Service deployed in VKS can be published to the public network via a ServiceExporter resource.
ServiceExporter is a custom resource defined by VKS for convenient service publishing.
ServiceExporter supports several publishing modes — for example, an auto-generated domain or a custom domain.
Auto-generated domain — architecture

The publish steps are detailed below.
Publish via auto-generated domain
Publish
The following manifest publishes a Service on a domain auto-minted by the platform:
Example:
# VKS service publishing
apiVersion: osm.datacanvas.com/v1alpha1
kind: ServiceExporter
metadata:
name: your-service-exporter-name # the name of your ServiceExporter resource
namespace: your-name-space # the namespace you created
spec:
serviceName: your-service-name # required
servicePort: 8188 # the port your Service listens onGet the service domain
Use kubectl describe serviceexporter to retrieve the domain of the Service:
kubectl describe serviceexporter your-serviceexporter-name -n your-namespaceThe result looks like:

The full address is {url}:{22443}, where 22443 is the fixed port VKS uses for published Services.
For example:
https://*****.sproxy.hd-01.alayanew.com:22443Call the service
URI: assemble per the API your service exposes.
For instance, if your service defines URI /test, call it with:
curl https://*****.sproxy.hd-01.alayanew.com:22443/testResponse:
{
"status": 0,
"message": "",
"data": "Welcome to VKS"
}Custom domain publishing
For a custom-domain publish flow, submit a request via the Alaya NeW website's online inquiry.
Last updated on
