/kube-dc:expose-servicefrom kube-dc
Exposes a Kubernetes Service from a Kube-DC project via Gateway HTTP/HTTPS/TLS routes or an EIP-backed LoadBalancer for TCP/UDP ports.
Ships in kube-dc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
To run an image and publish it in one step where the installation runs
Applications (applications.enabled and applications.create in
https://backend.<domain>/api/platform/info, see deploy-app), the hosted
MCP tool deploy_app creates the app (an Application, which generates the
Deployment and this kind of Service); rollout_status reports the URL.
Elsewhere, apply a Deployment and expose its Service as below. Do not add these
annotations to a Service an Application generated: set run.public and
run.hostnames on the Application instead.
{organization}-{project}.expose-route: "https", the platform issues the certificate. Don't
create an HTTP-01 Issuer for the shared Gateway: admission rejects it.| Need | Method |
|---|---|
| HTTP hostname | Gateway route with expose-route: "http" |
| HTTPS with Gateway TLS termination | Gateway route with expose-route: "https" |
| SNI-based TLS passthrough | Gateway route with expose-route: "tls-passthrough" |
| Selected TCP or UDP ports | EIP-backed LoadBalancer Service |
| Direct access to one VM interface | FIp; use the manage-networking skill |
| Private VIP for a Service inside a Managed Cluster | network.kube-dc.com/lb-pool: project label + loadBalancerClass: kube-dc.com/project; see the manage-cluster skill |
The Gateway controller creates HTTPRoute or TLSRoute resources. It does not create a GRPCRoute. Validate the application's HTTP/2 behavior before putting gRPC behind an HTTPS HTTPRoute; use a dedicated LoadBalancer when that compatibility is unknown.
apiVersion: v1
kind: Service
metadata:
name: "{service-name}"
namespace: "{backing-namespace}"
annotations:
service.nlb.kube-dc.com/expose-route: "https"
# Set this for a multi-port Service:
service.nlb.kube-dc.com/route-port: "{service-port}"
# Optional:
# service.nlb.kube-dc.com/route-hostname: "app.example.com"
# service.nlb.kube-dc.com/tls-issuer: "{own-dns01-or-ca-issuer}"
spec:
type: ClusterIP
selector:
app: "{application-label}"
ports:
- name: http
port: 8080
targetPort: 8080
This route-only Service allocates no EIP. For an existing Gateway LoadBalancer, retain its Service type and EIP binding during client-list edits.
The controller assigns a hostname under the installation's configured domain
unless route-hostname is set. Read it from
service.nlb.kube-dc.com/route-hostname-status; do not construct a provider
domain in automation. Whether the hostname is served is in
service.nlb.kube-dc.com/route-state; read it after every change (see
Report the publication state).
For https, the Gateway terminates TLS and forwards HTTP to the selected
Service port. For tls-passthrough, the backend terminates TLS and must
present a certificate valid for the public SNI hostname.
To use an existing TLS Secret with an HTTPS route, set
service.nlb.kube-dc.com/tls-secret. The Secret must contain a certificate
valid for the route hostname.
See envoy-gateway-examples.yaml.
After you apply or change a Gateway route, read the Service's route state. The platform writes it; never set it yourself.
kubectl get service {service-name} -n {backing-namespace} \
-o jsonpath='{.metadata.annotations.service\.nlb\.kube-dc\.com/route-state}{"\n"}'
# {"state":"Waiting","reason":"Certificate","hostname":"app.example.com","since":"2026-11-29T10:28:29Z"}
An empty answer usually means the platform has not finished its first pass:
read the Service's events (kubectl describe service {service-name}) and
check again after 30 seconds. If it is still empty, confirm the
expose-route annotation, then read route-hostname-status and the events.
The state's hostname says which name it describes; after a hostname change,
an old state can still name the previous one until the platform writes the
new state. Then tell the user the hostname, the state and, unless it is
Published, the reason and what it means:
| State | Reason | Tell the user | Do |
|---|---|---|---|
Published | none | The hostname is served. | Check it with curl. |
Waiting | Certificate | The certificate is being issued; new certificates can wait their turn. | Check again in a few minutes. For a custom hostname, check that its DNS points at the platform. |
Waiting | Policy | The client address allow-list is being put in force; no traffic until it is. | Check again in a few minutes; if it stays, the user should contact the platform operator. |
Waiting | ListenerSlot | The platform has no listener for the hostname yet; it retries every minute. | Check again later; if it stays for more than a few minutes, the user should contact the platform operator. |
Waiting | WildcardListener | The platform's shared listener for the domain is not ready yet. | Check again later. |
Refused | HostnameTaken | Another Service, organization or the platform holds this hostname or an overlapping wildcard. | Ask the user for another hostname. Do not pick one yourself. |
Refused | HostnameLimit | The organization has used all of its custom hostnames. | Show the count (below). The user removes a custom hostname or asks the operator to raise the limit. |
Refused | DomainNotVerified | The hostname is under no verified domain of the organization. | An organization admin verifies the domain (console Organization → Domains). |
Refused | PlatformName | The platform reserves this name for itself. | Ask the user for another hostname. |
Waiting clears by itself: do not delete, recreate or rename the Service to
speed it up. Refused needs a change from the user; apart from
PlatformName, the platform keeps checking and publishes the hostname once
the cause is gone. A waiting or refused hostname never affects hostnames that
are already published. The one exception is the Service's own allow-list
change: while it is put in force (Waiting, Policy), its route forwards no
traffic. A GatewayHostnameNotClaimable event, with no route
state or a state whose hostname is not the name you asked for, means the
platform cannot record the hostname; it retries every minute, and the user
should contact the operator if it stays.
A custom hostname is any route-hostname outside the platform domain. Each
one counts once toward the organization's limit, whatever its route type and
Project. Generated hostnames and other names under the platform domain do
not count. The default limit is 64 per organization; the platform operator
can set another one. Read it from the Organization before you add a custom
hostname:
kubectl get organization {organization} -n {organization} \
-o jsonpath='{.status.quotaUsage.customHostnames}{"\n"}'
# {"hard":"64","used":"3"}
hard is the limit, used the custom hostnames counted; a hard without
used means the installation does not count them and no limit applies. If
the command fails or prints nothing, do not conclude that there is no limit:
add the name and read the route state. When used is hard
or more, tell the user before adding a name: a new custom hostname is refused
with HostnameLimit, and moving a published Service to another custom
hostname is refused too (the old name keeps serving). Removing a
route-hostname, the exposure or the Service frees its count.
Create an address, then bind the Service:
apiVersion: kube-dc.com/v1
kind: EIp
metadata:
name: "{eip-name}"
namespace: "{backing-namespace}"
spec:
externalNetworkType: public
---
apiVersion: v1
kind: Service
metadata:
name: "{service-name}"
namespace: "{backing-namespace}"
annotations:
service.nlb.kube-dc.com/bind-on-eip: "{eip-name}"
spec:
type: LoadBalancer
selector:
app: "{application-label}"
ports:
- name: protocol
port: 8080
targetPort: 8080
protocol: TCP # or UDP
A public address is internet-routable subject to firewall policy. A
cloud address is reachable only from networks configured by the provider.
The availability of either pool is installation-specific.
On an installation with qualified direct-Service source-range enforcement,
restrict an EIP-backed LoadBalancer through spec.loadBalancerSourceRanges.
Omitting this field or using [] adds no source restriction. A /32 selects
one client address; 0.0.0.0/0 explicitly permits every IPv4 source.
The Kube-DC controller accepts at most 32 IPv4 CIDRs, validates every entry, and normalizes host bits and duplicates. Use the actual source addresses after any client-side NAT. Verify access from both an allowed and a denied source; an allocated IP alone does not prove enforcement.
For qualified Gateway exposure, use JSON
network.kube-dc.com/allowed-cidrs: '["198.51.100.7/32"]' on the parent Service.
Native Service ranges alone do not protect the shared Gateway. Confirm the
installation has matching admission, Envoy source preservation, policy
controllers and readiness contracts before applying restrictive intent.
A Gateway LoadBalancer requires both Gateway and backing-EIP qualification;
its nonempty native list must match the restrictive annotation. Do not apply
this annotation to arbitrary native routes and assume enforcement. The console
uses route-only ClusterIP creation for Gateway exposure and lets you edit client
CIDRs in Networking > Load Balancers > Edit > Reach when the
required method capabilities are qualified.
All methods are open by default: absent annotation or JSON [] requests no
additional source restriction. Invalid JSON, null, bare IPs and IPv6 are
errors. Verify the current controller acknowledgment and real allowed/denied
traffic; keep saved intent separate from applied protection. For Floating IPs,
use the manage-networking skill's qualified spec.allowedCIDRs contract.
See eip-loadbalancer-examples.yaml.
All route/LB annotations below use the
service.nlb.kube-dc.com/ prefix.
| Suffix | Meaning |
|---|---|
expose-route | http, https, or tls-passthrough |
route-hostname | Optional explicit FQDN |
route-port | One selected Service port; set it on multi-port Services |
tls-issuer | Your own dns01 or CA Issuer; default is the platform issuer |
tls-secret | User-provided TLS Secret |
bind-on-eip | Bind a LoadBalancer to a named EIP |
bind-on-default-gw-eip | Bind to the Project gateway EIP |
autodelete | Advanced recovery: delete a Service that remains without endpoints |
route-hostname-status | Read-only: the published hostname |
route-state | Read-only: Published, Waiting or Refused, with a reason |
autodelete does not manage EIP cleanup. Leave it unset for ordinary
workload lifecycle.
Set network.kube-dc.com/external-network-type: public|cloud when creating a
LoadBalancer that should allocate its own EIP. The network type is immutable
after allocation.
Gateway route:
kubectl get service {service-name} -n {backing-namespace} \
-o jsonpath='{.metadata.annotations.service\.nlb\.kube-dc\.com/route-state}{"\n"}'
kubectl get service {service-name} -n {backing-namespace} \
-o jsonpath='{.metadata.annotations.service\.nlb\.kube-dc\.com/route-hostname-status}{"\n"}'
kubectl get httproute,tlsroute,certificate -n {backing-namespace}
Report the state as in Report the publication state.
Only a Published hostname is expected to answer.
Dedicated address:
kubectl get eip {eip-name} -n {backing-namespace} \
-o jsonpath='{.status.ready}{"\t"}{.status.ipAddress}{"\n"}'
kubectl get service {service-name} -n {backing-namespace} \
-o jsonpath='{.status.loadBalancer.ingress[0].ip}{"\n"}'
If no address or hostname appears, inspect the Service, EIP, route, Certificate, and endpoints. A LoadBalancer cannot route to pods that do not match its selector.
Waiting
hostname broken or a Refused one temporary.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub kube-dc/kube-dc-public --plugin kube-dc18 skills in this plugin
/check-quotaCheck Kube-DC Organization and Project quota before creating workloads, VMs, databases, Managed Clusters, public IPs, or storage./create-databaseCreate a managed database (PostgreSQL, MySQL, MariaDB, ClickHouse) or Valkey cache in a Kube-DC Project as a ManagedService, deliver its credential to workloads with a ServiceBinding Secret, and prepare backup and restore workflows./create-projectCreate a Kube-DC Project inside an existing Organization. Covers network selection, quota preflight, the Project manifest, and readiness verification.Other plugins' skills for the same job