Kubernetes · Arazzo Workflow
Kubernetes Expose a Deployment Behind a Service
Version 1.0.0
Resolve a deployment, then create a fronting service or replace the existing one to match.
View Spec
View on GitHub
AutomationCloud NativeCNCFContainersDeploymentOpen SourceOrchestrationScalingArazzoWorkflows
Provider
Workflows
expose-deployment
Create or reconcile the service that fronts a deployment's pods.
Reads the deployment, looks for a service already selecting its pods, and either creates the service or replaces it to match the desired ports and type, then reads back the resulting cluster IP.
1
resolveDeployment
getNamespacedDeployment
Read the deployment to confirm it exists and to capture the pod template labels the service selector must match for traffic to reach any pod.
2
findExistingService
listNamespacedServices
List services carrying the app label to determine whether the deployment is already fronted, so the flow creates or reconciles accordingly.
3
reconcileService
replaceNamespacedService
Replace the existing service so its type, selector, and ports match the intent. The assigned clusterIP must be carried over, as it is immutable.
4
createService
createNamespacedService
Create the service fronting the deployment's pods when none exists. The API server assigns the cluster IP unless one is specified.
5
verifyService
getNamespacedService
Read the service back to report the cluster IP, resolved ports, and the selector traffic is routed by.