Skip to main content

Service exposure guide

This guide explains how to expose workloads in a Kube-DC Project. Choose the method by protocol and reachability: use a Gateway route for hostname-based web traffic, a LoadBalancer Service for selected TCP or UDP ports, and a Floating IP for direct access to a VM. Both Project network types support these methods.

Managed Clusters: every annotation below also works on LoadBalancer Services inside a Managed Cluster. The cloud controller manager copies them to the platform cluster at Service creation time. See Cluster management for the Managed Cluster specifics (hostname pinning, public-IP quota).

Quick reference​

NeedRecommended methodResult
HTTP or HTTPS hostnameGateway route: ClusterIP Service + expose-routeShared gateway, DNS name, optional automatic TLS, no EIP
Selected TCP or UDP portsLoadBalancer Service + EIPAddress and ports dedicated to the Service
Direct VM accessFloating IPOne-to-one NAT to the VM

Restrict client addresses​

For a direct EIP-backed LoadBalancer Service in a Kube-DC Project, set spec.loadBalancerSourceRanges to IPv4 CIDRs allowed to connect. Omit the field or set [] to add no source restriction. Use /32 for one client address and account for any client NAT.

apiVersion: v1
kind: Service
metadata:
name: private-api
spec:
type: LoadBalancer
loadBalancerSourceRanges:
- 198.51.100.7/32
selector:
app: private-api
ports:
- port: 443
targetPort: 8443

This filters the Service's external TCP/UDP ports on installations qualified for Kube-DC source-range enforcement. Test from one allowed and one denied source.

A restriction applies to the whole address, so two side effects follow when the EIP is shared, for example with the Project gateway EIP or another Service:

  • A restricted port is reserved for the Service. If a Pod's outbound traffic leaves the EIP from that same port, it can only reach allowed addresses.
  • With a restricted TCP port, fragmented TCP packets from addresses outside the list are dropped for every port of the EIP. Ordinary TCP traffic isn't fragmented, so this rarely matters.

Use a dedicated EIP when either case matters. For a Gateway route, set its separate JSON annotation:

metadata:
annotations:
service.nlb.kube-dc.com/expose-route: "https"
network.kube-dc.com/allowed-cidrs: '["198.51.100.7/32"]'

Gateway filtering requires qualified source-IP preservation, Envoy policies and attachment admission. Service source ranges alone do not restrict the shared Gateway. When a Gateway Service also has a LoadBalancer, its nonempty native list must match the restrictive annotation and both exposure paths must be qualified. Gateway-only Services created in the console and controller-managed route-only Services use ClusterIP and allocate no EIP. Editing an existing Gateway LoadBalancer retains its Service type and EIP binding. Its client list requires both Gateway and direct enforcement before you can change it in the console. Routes on the shared Gateway are created by the platform from Service annotations; Project roles can read them but not write them.

HTTPS and restricted TLS passthrough each get a listener of their own on the shared Gateway. HTTP and unrestricted TLS passthrough share the platform's listeners. A new listener can have to wait: the Service then reads Waiting with reason ListenerSlot and is published by itself once a listener is ready. Hostnames that are already published are not affected. Each Service reports whether its hostname is published; see Check whether a hostname is published. Hostnames outside the platform domain count toward your organization's custom hostname limit.

Hostnames are exclusive across HTTP, HTTPS, and TLS passthrough on the shared Gateway. An exact name conflicts with an overlapping wildcard. The controller retains your Service's hostname while its certificate or source policy is pending, including transitions between open and restricted access. Removing exposure releases the name after the controller confirms route and listener withdrawal. A conflicting Gateway route stays unpublished: the Service reads Refused with reason HostnameTaken, gets a GatewayHostnameConflict event, and is retried every 10 seconds. After the other owner releases the hostname, the next retry can publish your route.

A qualified Floating IP uses spec.allowedCIDRs; see External and floating IPs. Every list accepts at most 32 IPv4 CIDRs. Bare addresses, IPv6, malformed lists and invalid entries alongside /0 are rejected. [], omission and /0 request unrestricted IPv4 access; they do not bypass other access controls.

To set the list in the console, open Networking > Load Balancers, select Create Load Balancer, and enter Allowed client IPv4 CIDRs in the Reach step. You can change the list later: open the LoadBalancer, select Edit, and return to Reach. Empty creation leaves access open; clearing an existing list requests open access. Leaving the field untouched preserves it.

The console enables these controls only for operator-qualified methods and separates requested access from controller enforcement evidence. An allocated IP or a saved manifest does not prove protection. If a LoadBalancer Service also uses expose-route, Applied requires current controller acknowledgments for both its direct address and Gateway route. A missing or stale acknowledgment keeps the report Pending. A Service inside a managed Kubernetes cluster uses that cluster's LoadBalancer provider; check its support before relying on the same field there.

Note: Both network types support EIPs and LoadBalancers. The difference is where EIPs are allocated from.

Project network types​

Every installation supports the cloud type. The public Project type is available only when the provider enables it; otherwise the dashboard hides it and the API rejects it. When both are offered, choose an egressNetworkType:

apiVersion: kube-dc.com/v1
kind: Project
metadata:
name: production
namespace: acme
spec:
egressNetworkType: cloud # or "public"

This creates Project production in Organization acme. Kubernetes stores that Project's workload resources in the backing namespace acme-production.

Cloud network (egressNetworkType: cloud)​

  • Default EIPs allocated from the cloud address pool
  • Outbound traffic is SNATed through the Project gateway EIP
  • Can create public EIPs by specifying externalNetworkType: public when the provider exposes that pool and quota is available
  • Gateway Routes provide easy HTTPS exposure with auto-certificates
  • Supports VMs, pods, and all workload types
  • Best for: Web applications, APIs, microservices, and internal platform connectivity
  • Cost: Provider- and plan-dependent

Public network (egressNetworkType: public)​

  • Default EIPs allocated from the configured public address pool
  • Outbound traffic is SNATed through the Project gateway EIP
  • The default gateway EIP is allocated from the public address pool
  • Supports any TCP/UDP protocol
  • Supports VMs, pods, and all workload types
  • Best for: Game servers, custom protocols, direct IP requirements
  • Cost: Provider- and plan-dependent; public address quota still applies

Feature comparison​

FeatureCloud ProjectPublic Project
Default EIP sourceConfigured cloud address poolConfigured public address pool
Can get public EIPsWhen the provider exposes the pool and quota is availableYes by default, subject to quota
Can use Gateway RoutesYesYes
Can use EIP + LBYesYes
Can run VMsYesYes
Can run PodsYesYes

Part 1: Gateway routes​

Use Gateway routes for hostname-based HTTP, HTTPS, or TLS passthrough in either Project network type.

All Service annotations reference​

Gateway route annotations​

AnnotationDescriptionExample Values
expose-routeEnable Gateway routehttp, https, tls-passthrough
route-hostnameCustom hostname (optional)api.example.com
route-portTarget port (optional)8080, 50051
tls-issuerYour own cert-manager Issuer (dns01, CA, self-signed, or HTTP-01 through your own ingress); default is the platform issuermy-dns01-issuer
tls-secretUser-provided TLS secretmy-tls-secret

EIP/LoadBalancer annotations​

AnnotationDescriptionExample Values
bind-on-default-gw-eipUse project's default EIP"true"
bind-on-eipUse a specific EIP by namemy-eip
autodeleteDelete the Service if it remains without endpoints; advanced recovery behavior, not EIP lifecycle"true"
create-gateway-backendCreate Envoy Gateway backend"true"

Note: Prefix is service.nlb.kube-dc.com/

warning

autodelete does not manage EIP cleanup. It can delete the Service when the Service remains without endpoints. Leave it unset for normal workload lifecycle.

Network type annotation​

AnnotationDescriptionExample Values
network.kube-dc.com/external-network-typeEIP type for auto-created EIP (set at creation, immutable)cloud, public

Tip: Use this on a LoadBalancer service to get a public EIP in a cloud project:

annotations:
network.kube-dc.com/external-network-type: "public"

Set this when you create the Service. You cannot change it afterwards. The annotation chooses which external network the Service's address is allocated from, and an external IP keeps the type it was allocated with for life. Editing the annotation on a Service that already has an address is rejected, so you get a clear error instead of a change that appears to work and does nothing.

To move a workload to a different external network, create a second Service with the annotation you want, cut traffic over to its address, then delete the old one. In that order the workload always has a reachable address. deleting first would release the old IP before the new one is serving.

Status annotations (read-only)​

AnnotationDescription
route-hostname-statusAssigned hostname (set by controller)
route-stateWhether the hostname is published (Published, Waiting or Refused) and why; see Check whether a hostname is published

Note: All annotations use prefix service.nlb.kube-dc.com/

Gateway route annotations (details)​

Add these annotations to a ClusterIP Service. The platform publishes it on the shared Gateway with a hostname (and, for https, a certificate) and allocates no EIP. A LoadBalancer Service with the same annotations is published too, but it also gets its own EIP; use one only when the Service needs selected TCP or UDP ports as well (see Part 2).

Multi-port Services​

When using expose-route, the gateway routes traffic to a single port on your Service. By default this is the first port in spec.ports. For every multi-port Service, set route-port explicitly so a manifest reorder cannot silently change the routed backend.

If your application listens on a non-standard port, use the route-port annotation to specify which port the gateway should target:

annotations:
service.nlb.kube-dc.com/expose-route: "https"
service.nlb.kube-dc.com/route-port: "8080"

Note: This applies to all route types (http, https, tls-passthrough). The gateway terminates TLS (for https) or passes it through (for tls-passthrough), then forwards traffic to the selected port on your service.

Route type comparison​

Route TypePortTLSApp ServesUse Case
http80NoneHTTPPlain HTTP traffic
https443Gateway terminatesHTTPRecommended for web traffic; automatic TLS
tls-passthrough443App terminatesHTTPSEnd-to-end encryption

The simplest way to expose a web app with automatic TLS:

The platform issues the certificate. You don't need to create an Issuer.

Step 1: Deploy your application​

apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
namespace: acme-production
spec:
replicas: 2
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: app
image: nginx:alpine
ports:
- containerPort: 80

Step 2: Create a ClusterIP Service with an HTTPS route​

apiVersion: v1
kind: Service
metadata:
name: my-app
namespace: acme-production
annotations:
# Expose over HTTPS with an auto-provisioned certificate
service.nlb.kube-dc.com/expose-route: "https"
spec:
type: ClusterIP
selector:
app: my-app
ports:
- port: 80
targetPort: 80

Step 3: Verify and access​

# Check assigned hostname
kubectl get svc my-app -n acme-production -o jsonpath='{.metadata.annotations.service\.nlb\.kube-dc\.com/route-hostname-status}'
# Output: my-app-acme-production.example.com

# Check certificate status
kubectl get certificate -n acme-production
kubectl get challenge -n acme-production

# Test access
curl https://my-app-acme-production.example.com

For HTTPS routes, hostname status is set after the certificate and route are ready. This can take a few minutes. If the command returns an empty value, read the Service's route state; it says whether the hostname waits or is refused, and why:

kubectl get svc my-app -n acme-production \
-o jsonpath='{.metadata.annotations.service\.nlb\.kube-dc\.com/route-state}'
# Output: {"state":"Waiting","reason":"Certificate","hostname":"my-app-acme-production.example.com","since":"2026-11-29T10:28:29Z"}

See Check whether a hostname is published for every state and reason.

To redirect plain HTTP requests to HTTPS, add service.nlb.kube-dc.com/https-redirect: "true" (HTTPS routes only). Applications that build absolute URLs, such as WordPress, should honour the X-Forwarded-Proto: https header the Gateway sends.

Example: Plain HTTP​

For non-TLS HTTP traffic:

apiVersion: v1
kind: Service
metadata:
name: my-app
namespace: acme-production
annotations:
service.nlb.kube-dc.com/expose-route: "http"
spec:
type: ClusterIP
selector:
app: my-app
ports:
- port: 80
targetPort: 80

Open http://my-app-acme-production.example.com.

Example: TLS passthrough (Kubernetes API)​

For services that handle their own TLS (like Kubernetes control planes):

apiVersion: v1
kind: Service
metadata:
name: cluster-api
namespace: acme-production
annotations:
service.nlb.kube-dc.com/expose-route: "tls-passthrough"
spec:
type: ClusterIP
selector:
app: kube-apiserver
ports:
- port: 6443
targetPort: 6443

The Gateway listens publicly on port 443 and forwards to Service port 6443: https://cluster-api-acme-production.example.com.

Configure backend TLS first

TLS passthrough does not issue a certificate or terminate TLS. The TLSRoute selects a backend from the SNI hostname in the client's initial TLS handshake. The client must therefore connect by the published hostname, and the backend must present a certificate whose SANs include that hostname. For this example, add cluster-api-acme-production.example.com to the API server certificate before exposing it. Use a dedicated LoadBalancer address when the protocol does not start with a TLS handshake or the backend certificate cannot cover the Gateway hostname.

Example: Custom hostname​

Override the auto-generated hostname. A Service answers on one hostname, so the custom one replaces <service>-<project>.<domain>: the old name stops working once the change is saved.

  1. Point DNS at the platform first: a CNAME record from your hostname to the Service's current hostname (for a domain apex, A records to the gateway address). Turn off any CDN proxying (for example Cloudflare "proxied").
  2. Then set the hostname, in the console (Networking, the service's exposure) or with deploy_app domain in an AI app. Both refuse a hostname that does not resolve to the gateway yet and say which record to add. A name under the platform domain needs no record.
  3. The certificate is issued within 1 to 3 minutes; until then browsers warn.

To switch back, clear the hostname: the Service returns to its platform hostname (a few minutes of certificate errors if the custom certificate was already issued).

Verified domains​

Where the platform operator requires it (a platform setting; the console shows Organization → Domains only then), a hostname of your own must be under a domain your organization has verified. An organization admin adds the domain in the console (Organization → Domains) and publishes the TXT record shown there:

_kube-dc.example.com TXT "kube-dc-verify=<organization>-<token>"

The platform checks it every minute. Once verified, every Service of the organization may use example.com and any name under it (shop.example.com, api.eu.example.com). The same object in YAML, in the organization namespace:

apiVersion: kube-dc.com/v1
kind: VerifiedDomain
metadata:
name: example-com
namespace: <organization>
spec:
domain: example.com

With a wildcard record (*.example.com pointing at the platform), no Service under the domain needs a DNS record of its own; an organization admin can also make the domain the default for new apps (see Many apps under one domain).

kubectl get verifieddomain -n <organization> shows the record to add (status.recordName, status.recordValue) and status.verified. Hostnames your Services already used when the requirement was turned on keep working without a record. A hostname that is not covered is not published: the Service reads Refused with reason DomainNotVerified and gets a GatewayHostnameUnverified event. Once the domain is verified the route appears within a minute. Removing a domain, or the TXT record, never takes down a route already published.

apiVersion: v1
kind: Service
metadata:
name: my-app
namespace: acme-production
annotations:
service.nlb.kube-dc.com/expose-route: "https"
service.nlb.kube-dc.com/route-hostname: "api.mycompany.com"
spec:
type: ClusterIP
selector:
app: my-app
ports:
- port: 80
targetPort: 80

Note: You must configure DNS to point api.mycompany.com to the Gateway IP.

A custom hostname counts toward your organization's custom hostname limit.

Check whether a hostname is published​

The platform writes the state of each Gateway route on its Service, in the read-only annotation service.nlb.kube-dc.com/route-state:

kubectl get svc my-app -n acme-production \
-o jsonpath='{.metadata.annotations.service\.nlb\.kube-dc\.com/route-state}'
{"state":"Refused","reason":"HostnameLimit","hostname":"api.mycompany.com","since":"2026-11-29T10:28:29Z"}
FieldMeaning
statePublished, Waiting or Refused
reasonWhy the hostname is not published; absent for Published
hostnameThe hostname the Service asks for
sinceWhen the state, reason or hostname last changed (UTC)
  • Published: the hostname is served.
  • Waiting: the platform publishes the hostname by itself once the reason clears. You don't need to change anything.
  • Refused: the hostname stays unpublished until something changes: you pick another hostname, verify the domain, or free a custom hostname. For every reason except PlatformName the platform keeps checking, so the hostname is published once the cause is gone.

A waiting or refused hostname never takes down a hostname that is already published, on this Service or any other. The exception is a change to a restricted exposure: a new client address allow-list, or a hostname or route type change on restricted TLS passthrough, withdraws the route while the new setting is put in force (Waiting, Policy).

StateReasonWhat it meansWhat to do
WaitingCertificateThe certificate for the hostname is being issued. A new certificate can also wait its turn: the platform can pace the orders it sends to the public certificate authority, and renewals of certificates close to expiry are never held.Usually nothing. For a custom hostname, check that its DNS record points at the platform.
WaitingCertificateIssuerThe certificate issuer is missing or reports that it is unavailable.Ask your platform operator to check the issuer. The hostname publishes automatically after the certificate is ready.
WaitingCertificateIssuerThe platform cannot issue a certificate for the hostname yet: the certificate issuer it uses is missing or not working. Waiting alone does not clear it; the platform operator is alerted, and the hostname is published by itself once they fix the issuer.Ask your operator if it stays. If you named your own issuer with service.nlb.kube-dc.com/tls-issuer, check that it exists in your project.
WaitingPolicyThe client address allow-list (network.kube-dc.com/allowed-cidrs) is being put in force. The route forwards no traffic until it is.Wait. Ask your operator if it stays for more than a few minutes.
WaitingListenerSlotThe hostname has no listener on the shared Gateway yet. Publication is retried every minute.Wait. Ask your operator if it stays for more than a few minutes.
WaitingWildcardListenerThe platform's shared listener for this domain is not ready yet. Reserved for platform domains with a shared listener; you may never see it.Wait.
RefusedHostnameTakenAnother Service, another organization or the platform holds this hostname, or a wildcard that overlaps it. Retried every 10 seconds.Choose another hostname, or remove the other exposure if it is yours.
RefusedHostnameLimitYour organization uses all of its custom hostnames. Retried every minute.Remove a custom hostname you no longer need, or ask your operator to raise the limit.
RefusedDomainNotVerifiedThe hostname is under no domain your organization has verified. Retried every minute.Verify the domain; see Verified domains.
RefusedPlatformNameThe platform reserves this name for itself, for example login or console under the platform domain.Choose another hostname.

The Service's events say the same. A waiting hostname gets a GatewayHostnamePending event whose message starts with the reason, for example Certificate: .... Refusals get GatewayHostnameConflict (HostnameTaken), GatewayHostnameLimit, GatewayHostnameUnverified or GatewayHostnameReserved (PlatformName):

kubectl describe svc my-app -n acme-production

If the annotation is missing on a new Service, the platform has not finished its first pass over it yet; check the events. A GatewayHostnameNotClaimable event means the platform cannot record the hostname for this Service. It is retried every minute. Ask your operator if it stays.

Custom hostname limit​

Each organization can publish a limited number of custom hostnames. A custom hostname is any name outside the platform domain, such as api.mycompany.com. Generated names (<service>-<project-namespace>.<platform-domain>) and other names under the platform domain don't count. Each custom hostname counts once, whatever its route type and whichever Project uses it.

The default limit is 64 custom hostnames per organization. Your operator can set another limit for your organization. Read the count and the limit from the Organization:

kubectl get organization acme -n acme \
-o jsonpath='{.status.quotaUsage.customHostnames}'
# Output: {"hard":"64","used":"3"}

hard is the limit and used is the number of custom hostnames counted. If used is missing, the platform doesn't count custom hostnames yet, and no limit applies.

When the organization is at its limit:

  • A new custom hostname is refused (Refused, reason HostnameLimit). It is retried every minute and published as soon as a count is free or the limit is raised.
  • Moving a published Service to another custom hostname needs a free count too, because the new name is taken before the old one is released. At the limit the change is refused and the old hostname keeps serving.
  • Hostnames that are already published keep working, also if the limit is later lowered below what the organization uses.

A count is freed when the Service stops using the hostname: you remove the route-hostname annotation or expose-route, change the hostname, or delete the Service.

Example: User-Provided Certificate​

Use your own TLS certificate instead of auto-provisioning:

# First, create your TLS secret
kubectl create secret tls my-tls-secret \
--cert=path/to/tls.crt \
--key=path/to/tls.key \
-n acme-production
apiVersion: v1
kind: Service
metadata:
name: my-app
namespace: acme-production
annotations:
service.nlb.kube-dc.com/expose-route: "https"
service.nlb.kube-dc.com/tls-secret: "my-tls-secret"
service.nlb.kube-dc.com/route-hostname: "secure.mycompany.com"
spec:
type: ClusterIP
selector:
app: my-app
ports:
- port: 80
targetPort: 80

The certificate in my-tls-secret must include secure.mycompany.com in its SANs and chain to a CA trusted by your clients.

gRPC​

The expose-route annotation creates an HTTPRoute, even when a Service port sets appProtocol: kubernetes.io/h2c. It does not create a GRPCRoute or configure an HTTP/2 backend. To expose gRPC, use a dedicated LoadBalancer Service with an EIP. See Part 2: EIP-based exposure.


Part 2: EIP-based exposure (both Project types)​

Both cloud and public projects can use EIPs and LoadBalancer services.

Default EIP allocation​

Project TypeDefault EIP SourceCan Request
CloudConfigured cloud address poolcloud; public when the provider exposes that pool and quota is available
PublicConfigured public address poolpublic; other types depend on provider configuration and quota

When to use an EIP, and when to use a Gateway Route:

  • Use Gateway Routes for HTTP/HTTPS/TLS passthrough (automatic TLS for HTTPS)
  • Use EIPs for gRPC and other TCP/UDP protocols, VMs, or when you need a dedicated IP

How EIPs work​

External IPs (EIPs) provide addresses for your Project from a provider-configured external network.

Default Gateway EIP​

Every Project automatically gets a default EIP (default-gw) for outbound SNAT. A LoadBalancer Service uses it only when you set bind-on-default-gw-eip: "true"; otherwise the platform can allocate a Service-specific EIP.

Create an extra EIP​

For services that need dedicated IPs:

apiVersion: kube-dc.com/v1
kind: EIp
metadata:
name: web-server-eip
namespace: acme-production
spec:
externalNetworkType: public # or "cloud"

EIP Types:

externalNetworkTypeDescriptionUse Case
cloudAddress from the cloud networkInternal platform connectivity and outbound SNAT
publicDedicated public IPDirect access, static IP, VMs

Tip: When your provider offers public addresses to cloud Projects, request a public EIP for workloads that need a dedicated internet-routable IP.

LoadBalancer Service annotations​

AnnotationDescription
service.nlb.kube-dc.com/bind-on-default-gw-eip: "true"Use project's default EIP
service.nlb.kube-dc.com/bind-on-eip: "eip-name"Use a specific EIP

Example: Web server on default EIP​

apiVersion: v1
kind: Service
metadata:
name: nginx-lb
namespace: acme-production
annotations:
service.nlb.kube-dc.com/bind-on-default-gw-eip: "true"
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- name: http
port: 80
targetPort: 80
- name: https
port: 443
targetPort: 443

Example: Service on dedicated EIP​

# Step 1: Create dedicated EIP
apiVersion: kube-dc.com/v1
kind: EIp
metadata:
name: api-eip
namespace: acme-production
spec:
externalNetworkType: public
---
# Step 2: Bind service to the EIP
apiVersion: v1
kind: Service
metadata:
name: api-lb
namespace: acme-production
annotations:
service.nlb.kube-dc.com/bind-on-eip: "api-eip"
spec:
type: LoadBalancer
selector:
app: api-server
ports:
- port: 443
targetPort: 443

Example: VM SSH access​

Expose SSH access to a virtual machine:

apiVersion: v1
kind: Service
metadata:
name: vm-ssh
namespace: acme-production
annotations:
service.nlb.kube-dc.com/bind-on-default-gw-eip: "true"
spec:
type: LoadBalancer
selector:
vm.kubevirt.io/name: my-vm # Target VM name
ports:
- name: ssh
port: 2222 # External port
targetPort: 22 # Internal SSH port

Floating IPs (FIPs)​

Floating IPs map an internal IP directly to an EIP, providing 1:1 NAT. For detailed FIP management, see External and floating IPs.

When to use FIPs​

  • Direct IP mapping for VMs
  • Whole-VM exposure across many ports
  • Protocols that are awkward to model as individual Service ports

Create a FIP for a VM​

Use vmTarget to point a FIP at a VM. The controller reads the named interface address from the running VirtualMachineInstance status, so the VM must be running and that interface must report an IP:

apiVersion: kube-dc.com/v1
kind: FIp
metadata:
name: vm-fip
namespace: acme-production
spec:
externalNetworkType: public
vmTarget:
vmName: ubuntu
interfaceName: vpc_net_0

Important limitation: FIP and LoadBalancer conflicts​

A pod/VM cannot simultaneously serve as:

  1. A target for a public FIP
  2. A backend for a cloud-network LoadBalancer service

This is because public FIPs create source-based policy routes that redirect ALL outbound traffic from that IP to the public gateway, breaking cloud-network services.

Example conflict:

Public FIP and cloud LoadBalancer conflictOne Pod or virtual machine at internal address 10.0.0.30 is simultaneously selected by a public Floating IP and a cloud-network LoadBalancer Service. The public FIP creates source-based routing toward public gateway 198.51.100.1, while the cloud LoadBalancer expects return traffic through cloud gateway 100.65.0.1. The conflicting asymmetric paths break the service.Pod or VM10.0.0.30Public pathpublic FIPgateway 198.51.100.1Cloud pathcloud LoadBalancergateway 100.65.0.1BROKEN: conflicting source routingChoose one exposure method or keep both paths on the same network type.
This is an unsupported mixed-gateway combination: a public FIP forces the workload's return path toward the public gateway while the cloud LoadBalancer expects the cloud gateway.

Workarounds:

  • Use separate pods for FIP targets and cloud-service backends
  • Use the same network type for both (all public or all cloud)
  • Choose one exposure method per pod

Part 3: Choosing the right approach​

Decision tree​

Choose a Kube-DC exposure methodThe exposure decision starts with the workload and protocol. A web application or API uses an HTTPS Gateway Route with automatic hostname and TLS after Issuer setup. Direct SSH or RDP access to a virtual machine uses a dedicated EIP and Floating IP mapping. A custom TCP, UDP, or gRPC service uses a dedicated EIP and LoadBalancer Service with explicit ports. Multiple Services that intentionally share one external address can use the default gateway EIP with distinct ports where the platform supports that pattern.Exposure needworkload + protocolGateway Routeweb app / APIHTTPS + TLSFloating IPVM direct accessEIP + FIPLoadBalancerTCP / UDPEIP + LBShared gatewaymultiple Servicesshared EIP · portsKeep network type and return path consistentDo not combine public-FIP and cloud-LoadBalancer return paths on one endpoint.
Choose by traffic shape: hostname-based web traffic uses a Gateway Route, direct VM access uses a Floating IP, and arbitrary declared TCP or UDP ports use an EIP-backed LoadBalancer.

Comparison table​

FeatureGateway route (any Project)EIP + LoadBalancer (any Project)
IP AddressShared Gateway IPDedicated per EIP
ProtocolsHTTP, HTTPS, TLS passthroughAny TCP/UDP
TLS TerminationGateway (auto-cert)Application
CostProvider- and plan-dependentProvider- and plan-dependent
SetupSimple annotationEIP + Service config
DNSAuto hostnameManual
Best ForWeb apps, APIsVMs, game servers

Part 4: Advanced topics​

Envoy Gateway backend​

Use the create-gateway-backend annotation on a LoadBalancer Service to register an Envoy Gateway Backend for advanced routing scenarios. Prefer expose-route unless you are also managing the route yourself.

apiVersion: v1
kind: Service
metadata:
name: my-backend
namespace: acme-production
annotations:
service.nlb.kube-dc.com/create-gateway-backend: "true"
spec:
type: LoadBalancer
selector:
app: my-app
ports:
- port: 8080
targetPort: 8080

This creates an Envoy Gateway Backend resource, enabling:

  • Cross-namespace routing from Gateway
  • Custom backend policies
  • Advanced load balancing configurations

Namespace-scoped Ingress controller​

For advanced HTTP routing beyond Gateway capabilities, deploy a dedicated ingress-nginx:

This chart creates namespace-scoped Roles and RoleBindings, so installation requires the Project admin role. A developer can operate supported workload resources but cannot install this RBAC. Render and validate the chart against the server before installing it.

# ingress-values.yaml
controller:
ingressClassResource:
enabled: false
scope:
enabled: true
namespace: acme-production
admissionWebhooks:
enabled: false
service:
annotations:
service.nlb.kube-dc.com/bind-on-default-gw-eip: "true"
rbac:
create: true
scope: true
defaultBackend:
enabled: false
helm install ingress ingress-nginx/ingress-nginx \
--namespace acme-production \
--values ingress-values.yaml

Troubleshooting​

Gateway routes​

# Check route hostname was assigned
kubectl get svc my-app -o yaml | grep route-hostname-status

# Check whether the hostname is published, waits or is refused, and why
kubectl get svc my-app -n acme-production \
-o jsonpath='{.metadata.annotations.service\.nlb\.kube-dc\.com/route-state}'
kubectl describe svc my-app -n acme-production

# Check certificate status
kubectl get certificate -n acme-production
kubectl describe certificate my-app-tls -n acme-production

# Check HTTPRoute created
kubectl get httproute -n acme-production

The platform Gateway and controller run outside your Project permissions. If the Project resources above are healthy but the route still fails, provide the Service name and Project name to support.

EIP and LoadBalancer​

# Check EIP status
kubectl get eip -n acme-production
kubectl describe eip my-eip -n acme-production

# Check LoadBalancer external IP
kubectl get svc -n acme-production

# Check service events
kubectl describe svc my-lb -n acme-production

Common issues​

IssueCauseSolution
No hostname assignedMissing expose-route annotationAdd annotation
Hostname status empty for HTTPSCertificate is still pending (route-state reads Waiting, Certificate)Check kubectl get certificate,challenge -n acme-production
route-state reads WaitingThe platform publishes the hostname by itself once the reason clearsSee the reasons; ask your operator if it stays
route-state reads RefusedHostname held by another owner, organization at its custom hostname limit, domain not verified, or a reserved platform nameAct on the reason; see the reasons
Certificate not readyACME challenge pending, DNS not pointing at the Gateway, or quota prevents solver pod creationCheck DNS for custom hostnames and make sure the project has free CPU/memory for cert-manager HTTP-01 solver pods
503 errorBackend not readyCheck pod status
EIP pendingNo available IPsCheck subnet capacity
Connection timeoutDNS not configuredPoint DNS to Gateway/EIP
Cloud LB stopped working after FIP createdFIP policy route conflictUse separate pods or delete FIP (see limitation)

Summary​

NeedResource or annotationResult
Automatic HTTPSClusterIP + expose-route: httpsGateway terminates TLS and assigns a hostname
Plain HTTPClusterIP + expose-route: httpGateway serves HTTP
End-to-end TLSClusterIP + expose-route: tls-passthroughApplication terminates TLS; public listener is 443
Reuse Project gateway EIPLoadBalancer + bind-on-default-gw-eip: "true"Selected ports share the gateway address
Use a selected EIPLoadBalancer + bind-on-eip: "name"Selected ports use that address
Direct VM mappingFIpOne-to-one NAT to the VM