Skip to content

API exposure options

The control plane ships with one Service and no ingress. How the API becomes reachable is your decision, and it is two decisions rather than one, because your CLI and your nodes reach it from different places.

What the manifest gives you

kind: Service
metadata:
  name: xratu-control-plane
  namespace: xratu-cp
spec:
  selector:
    app: xratu-control-plane
  ports:
  - name: http
    port: 8080
    targetPort: 8080

No type is set, so the Service is cluster-internal. Nothing in the shipped manifests exposes the API outside the cluster, which is deliberate: exposure is a posture decision rather than a default.

The two consumers

Consumer Reaches the API from Uses
Data plane nodes Inside a cluster The service DNS name
CLI and automation Outside the cluster Whatever you expose

Nodes use the in-cluster address, written into their bootstrap document as control_plane.base_url:

http://xratu-control-plane.xratu-cp.svc.cluster.local:8080

Nodes never need the API exposed beyond the cluster. They make outbound calls to this address and the control plane never dials back, so a node behind a restrictive network policy works as long as it can reach the service.

Your CLI needs an address it can reach from your workstation, and that is what the options below are about.

Option 1: port-forward

The recommended default for a self-hosted deployment.

kubectl -n xratu-cp port-forward svc/xratu-control-plane 18080:8080

Why it is the default. It exposes nothing publicly, it requires no additional infrastructure, and access is bounded by your existing cluster credentials: whoever can forward the port already had cluster access.

What it costs. It is per-operator and per-session. The forward dies with the process, which makes it unsuitable for automation that must run unattended, and it does not serve a team.

Option 2: your own ingress

For a deployment that needs a durable address for operators or automation, you put your own ingress, gateway or load balancer in front of the Service. Xratu ships none of these, so the shape is entirely yours.

Three things to settle if you go this way. Terminate TLS, since the Service speaks plain HTTP on 8080. Restrict who can reach it, because reachability is part of the access model. And keep the node path unchanged, since nodes should continue using the in-cluster address rather than routing out and back.

Why reachability is part of the access model

In a private self-hosted control plane, privacy is enforced by network reachability and authentication restrictions before authorisation is ever evaluated. An actor who should not be able to create an organisation should not be able to authenticate to the control plane in the first place.

That is why exposing the API is a security decision and not a convenience one. Widening reachability widens the set of identities that can attempt an exchange, and the control plane's auth posture, which governs which issuers and audiences it accepts, becomes locked once the deployment is finalized. See Post-finalization limits.

Health endpoints and exposure

The three health endpoints are served by the same api container on the same port, so they follow whatever exposure you choose:

/v1/system/health/startup
/v1/system/health/readiness
/v1/system/health/liveness

Kubernetes probes reach them in-cluster regardless, so a deployment with no external exposure is still fully probed.