Expose a Service through stage ingress
Select one named TCP port of your Kubernetes Service for the Konfidence-managed stage route. Publishing a deployment result alone does not add an ingress rule.
Prerequisites
Before you begin, make sure you have:
- A Service manifest in a Helm or Kustomize artifact.
- A landscape with Gateway routing configured by your administrator, including a
gateway-route.konfidence.cloudactivation task registration. kubectlaccess to readStage,VectorDeployment, andHTTPRouteresources in the landscape namespace.
Select the exposed port
Edit the Service manifest in your artifact:
- Set
konfidence.cloud/deployment-resultto the stable name clients use to select the Service. - Set
konfidence.cloud/exposed-port-nameto the name of the TCP port inspec.ports, not its port number ortargetPort.
For example, this Service selects its http port for stage ingress:
apiVersion: v1
kind: Service
metadata:
name: candidates
annotations:
konfidence.cloud/deployment-result: candidates
konfidence.cloud/exposed-port-name: http
spec:
selector:
app: candidates
ports:
- name: http
port: 80
targetPort: httpOnly the selected port gets an ingress rule. Other ports remain available for in-cluster calls. See the Service ingress annotation reference for defaults and validation errors.
Publish and activate the change
Deliver the manifest change through your artifacts, rather than patching a deployed Service:
- Publish a new artifact version and build a vector that references it.
- Deliver that vector to the intended stage through your promotion flow.
- Ask your administrator to configure the edge route with
x-konfidence-serviceset to your deployment result name (candidatesin this example) andx-konfidence-stageset to the target stage name. The annotation enables stage routing for the Service. It does not create an external hostname or edge route.
Verify the result
After the target vector is active, read the stage's active StageVersion name. Replace the stage and namespace placeholders with your target values:
kubectl get stage <stage-name> -n <landscape-namespace> \
-o jsonpath='{.status.activeStageVersion.name}{"\n"}'The active StageVersion and its VectorDeployment share the same name and namespace. Use the returned name as <vector-deployment-name> below.
If the output is empty, the stage has no active version yet. Wait for activation before continuing.
kubectl get vectordeployment <vector-deployment-name> -n <landscape-namespace> -o yaml
kubectl get httproute konfidence-stage-<stage-name> -n <landscape-namespace> -o yamlThe candidates deployment result has spec.IngressExposedPortName: http. The stage route has a rule matching x-konfidence-service: candidates with the deployed Service's name and backend port 80. An unselected Service has no rule.
Remove ingress exposure
If no deployment result selects an exposed port, the next gateway-route activation removes any existing stage HTTPRoute and succeeds. It does not delete workloads, Services, or administrator-owned Gateways and edge routes.
To stop routing ingress traffic to a Service, remove konfidence.cloud/exposed-port-name from its artifact manifest, then publish and deliver a new vector. Keep konfidence.cloud/deployment-result if other components still need to discover the Service.