expose-app
Skill3 starsChanged 6 months agoMITView on GitHub
Gives a deployed app a public or internal URL by creating an HTTPRoute on the Intility Developer Platform. Use when the user says "expose my app", "give my app a URL", "make my app accessible", "set up ingress", "create a route", or after deploy-app finishes and the user wants the app reachable.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cluster-loginSkill
- create-clusterSkill
- deploy-appSkill
- getting-startedSkill
- otel-operatorSkill
- prepare-appSkill
- statusSkill
- update-imageSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 6 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
If it errors, route to cluster-login first.
- Very specific: line 49
Look at the PROGRAMMED column.
- Very specific: line 60
If a gateway has no wildcard listener (or returns empty), ask the user what domain to use for that gateway — oc describe gateway <name> -n …
- Very specific: line 66
If only internal is programmed, use it without asking.
- Distinctive: line 86
Before showing this question, also surface the security considerations in one short paragraph.
- Very specific: line 96
Only proceed with public if the user explicitly confirms after seeing this.
- Very specific: line 100
If the user came from deploy-app, you already have:
- Distinctive: line 104
If not, look them up. List Services in non-system namespaces:
- Distinctive: line 112
Ask which to expose:
- Distinctive: line 123
Default the subdomain to the app/service name.
- Very specific: line 137
Use the template from references/httproute-templates.md.
- Distinctive: line 156
Wait ~10 seconds for the gateway controller to pick it up, then check it attached:
- Very specific: line 196
If the gateway was public, include one extra line in the report:
- Very specific: line 212
Don't create Ingress or Route resources.
- Very specific: line 213
Don't try to create a Gateway — the platform team has already created them.
- Distinctive: line 214
Don't add TLS config to the HTTPRoute.
- Very specific: line 215
Don't suggest NodePort or LoadBalancer Services.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Expose App
Goal
Make a deployed app reachable on a URL by creating an HTTPRoute. The platform team has already set up the underlying gateways — you only create the route.
End state: curl http://<hostname>/ returns a non-error status code.
Background (one paragraph, share with the user as needed)
The platform runs Envoy Gateway. Two pre-built gateways are typically available: internal (only reachable from inside the organization's own network) and public (open to the internet). You don't create gateways — you just create an HTTPRoute that points at one. TLS is handled for you, so HTTPRoutes use plain HTTP on port 80; users still get HTTPS at the URL.
The domain each gateway uses is the organization's own — not hardcoded in this skill. We read it from the gateway's listener config.
Step 0 — Confirm access
oc whoamiIf it errors, route to cluster-login first.
If oc returns "Unauthorized" mid-flow
The oc token has expired. Don't retry the failing command. Stop where you are, route to the cluster-login skill, then resume from the failed step.
Step 1 — Find the gateways
oc get gateways -n envoy-gateway-systemLook at the PROGRAMMED column. Only offer gateways that show True. If no gateway is programmed, stop and tell the user to reach out to the Developer Platform Admins via their collaboration channel (samhandlingskanal) — the cluster isn't ready for ingress.
For each programmed gateway, read its listener hostname template — that's the organization's domain. The pattern is usually a wildcard like *.apps.example.com:
oc get gateway <gateway-name> -n envoy-gateway-system \
-o jsonpath='{range .spec.listeners[*]}{.hostname}{"\n"}{end}'Capture the hostname template for each gateway. You'll substitute the * with the app's subdomain in Step 4.
If a gateway has no wildcard listener (or returns empty), ask the user what domain to use for that gateway — oc describe gateway <name> -n envoy-gateway-system will show what hostnames the gateway permits.
Step 2 — Pick which gateway
Default to internal always. It's the safe choice and what almost every app should use.
If only internal is programmed, use it without asking. Otherwise:
Q: "Who should be able to reach this app?"
Options:
- "Only people on the internal network (internal)" — internal tools, dashboards, APIs, anything not meant for the open internet (Recommended)
- "Anyone on the internet (public)" — for apps you've deliberately decided should be publicly reachableIf the user picks public — confirm explicitly
Putting an app on the public gateway means anyone on the internet can hit it. Most apps shouldn't be there. Before generating the manifest, stop and ask a follow-up confirmation:
Q: "Just to confirm — putting this on the public gateway means anyone on the internet can reach it. Are you sure?"
Options:
- "Yes, this is meant to be public (e.g. marketing site, public API, user-facing app)"
- "No, switch to internal" — go back and use the internal gateway insteadBefore showing this question, also surface the security considerations in one short paragraph. Don't lecture — list the things that change:
Exposing on
publicmeans:
- The app is reachable from anywhere on the internet, not just your network.
- You become responsible for the app's own authentication — there's no network-level gatekeeping anymore.
- Any unprotected admin pages, debug endpoints, or unauthenticated APIs are exposed to bots and scanners within minutes.
- Secrets in URLs, verbose error pages, or dev-mode flags will be visible to the world.
If the app doesn't have its own login / auth, or you haven't reviewed what endpoints it exposes, choose
internal.
Only proceed with public if the user explicitly confirms after seeing this. If they choose "switch to internal" or hesitate, use internal.
Step 3 — Find the Service to point at
If the user came from deploy-app, you already have:
<app-name>(used as both deployment and service name)<namespace>
If not, look them up. List Services in non-system namespaces:
oc get svc --all-namespaces \
-o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,PORT:.spec.ports[0].port \
| grep -v -E '^(openshift-|kube-|envoy-gateway-system|argocd|default )'Ask which to expose:
Q: "Which app do you want to expose?"
Options: [one per Service, label '<name> (in <namespace>, port <port>)']The Service from deploy-app listens on port: 80 — that's what the HTTPRoute connects to.
Step 4 — Subdomain and final hostname
Default the subdomain to the app/service name. Only ask if the user has indicated they want something different.
Build the hostname by substituting the subdomain into the gateway's listener template from Step 1:
listener template: *.apps.example.com
subdomain: myapp
→ hostname: myapp.apps.example.comConfirm the full hostname back to the user in one line before generating the manifest — easy to catch typos and avoids surprises.
Step 5 — Generate the HTTPRoute
Use the template from references/httproute-templates.md. Write the file to k8s/<app-name>/httproute.yaml (alongside the other manifests, so the user can see the whole app in one place).
Substitutions:
| Placeholder | Value |
<route-name> | <app-name> |
<namespace> | <app-name> |
<gateway-name> | internal or public |
<hostname> | from Step 4 |
<service-name> | the Service name (same as <app-name> if from deploy-app) |
<service-port> | 80 (the Service's port, not the container port) |
Step 6 — Apply and verify
oc apply -f k8s/<app-name>/httproute.yamlWait ~10 seconds for the gateway controller to pick it up, then check it attached:
oc describe httproute <route-name> -n <namespace>In the Status block, look for:
Parents:
Parent Ref:
Name: <gateway-name>
Conditions:
Type: Accepted
Status: True
Type: ResolvedRefs
Status: TrueBoth must be True. If Accepted is False, the hostname conflicts with another route or the gateway rejected it — show the user the condition message. If ResolvedRefs is False, the Service name or port is wrong — double-check Step 5 substitutions.
Step 7 — Smoke test
curl -s -o /dev/null -w "%{http_code}\n" http://<hostname>/200–399→ working502/503→ route is attached but the pod isn't responding. Checkoc get pods -n <namespace>— is itRunning? Are the ports right (Service.targetPortshould match the container port)?- Timeout on the
internalgateway from a remote machine → likely a network reachability issue. The internal hostname may only resolve from inside the organization's network or via VPN. Ask: "Are you connected to the network this cluster is normally reached from?"
Step 8 — Report
Your app is live at: http://<hostname>/
(Gateway: <gateway-name> — <internal-only | open to the internet>)
To change the URL later, edit the `hostnames` field in k8s/<app-name>/httproute.yaml and re-apply.If the gateway was public, include one extra line in the report:
Reminder: this app is reachable from the open internet. Make sure its own authentication, debug pages, and error responses are reviewed before sharing the URL.
Changing your mind later
- Switch from
internaltopublic(or back): edithttproute.yaml— changeparentRefs[0].nameand update thehostnamesfield to the new gateway's domain (re-run Step 1 to get the new listener template), thenoc apply -f. Old route is overwritten in place. If switching topublic, redo the security check from Step 2. - Take it down:
oc delete -f k8s/<app-name>/httproute.yaml.
References
- references/httproute-templates.md — YAML templates for simple, path-split, and multi-hostname routes
- references/usage-examples.md — typical conversations (internal URL, public confirmation flow, route conflicts, 502 troubleshooting)
What not to do
- Don't create
IngressorRouteresources. This platform uses HTTPRoute (Gateway API). - Don't try to create a
Gateway— the platform team has already created them. You only create HTTPRoutes. - Don't add TLS config to the HTTPRoute. TLS terminates at the gateway; you talk plain HTTP behind it.
- Don't suggest
NodePortorLoadBalancerServices. The HTTPRoute → ClusterIP Service is the path.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

