Skip to main content

How Networking Works

This page explains Kube-DC networking concepts — how your project connects to the internet, how traffic flows, and which tools are available to expose your services.

Key Concepts

ResourceWhat It Does
VPCIsolated virtual network for your project — all VMs and pods get private IPs here
SubnetPrivate IP range chosen for the Project when it is created
EIP (External IP)Cloud-internal or public address used by a Project gateway or LoadBalancer Service
FIP (Floating IP)One-to-one NAT mapping from an external address to a VM or another selected internal IP
LoadBalancerKubernetes Service that routes external traffic to pods or VMs via an EIP
Gateway RouteHTTP or HTTPS route through the shared Envoy Gateway; HTTPS uses a configured Project Issuer
Routed NetworkOrganization-authorized L3 routes from the whole Project VPC to approved external destinations; Internet remains unchanged

Project Network Types

A Project selects the address pool for its default gateway when it is created. Both network types keep workloads on private Project addresses and use source NAT (SNAT) for outbound traffic. The choice does not, by itself, expose a workload.

Cloud Network (egressNetworkType: cloud)

  • The default gateway receives an internal cloud address.
  • Internet-bound traffic continues through platform upstream networking.
  • The gateway address is not directly reachable from the public internet.
  • Use a Gateway Route, or allocate a public EIP or FIP when your provider and quota allow it.

Public Network (egressNetworkType: public)

  • The default gateway receives an internet-routable address.
  • Outbound traffic is SNATed to that address.
  • Inbound traffic still requires an explicit Gateway Route, LoadBalancer Service, or FIP and remains subject to platform and workload policy.

Comparison

FeatureCloudPublic
Default gateway addressCloud-internalInternet-routable
Outbound internet through SNATYesYes
Gateway RoutesSupportedSupported
LoadBalancer Services and FIPsSubject to provider configuration and quotaSubject to provider configuration and quota

How Traffic Flows

Outbound (VM/Pod → Internet)

Project outbound traffic through SNATA virtual machine or Pod with a private Project address sends outbound traffic to the Project VPC router. The router applies source NAT using the default gateway EIP. The translated traffic then reaches the Internet when platform egress policy and upstream networking allow it.SNATVM or Pod10.0.0.xProject routerVPC routingGateway EIPSNAT sourceUpstreamInternet whenpolicy permits
Private workload traffic leaves through the Project router, which applies source NAT using the Project gateway EIP before forwarding to the permitted upstream network.

Every Project has a default EIP for outbound SNAT. Internet access remains subject to platform egress policy and upstream availability.

Routed Network (Project VPC → approved remote network)

Project VPC connected to an approved remote network with BGPWorkloads in Project production use VPC 10.0.0.0/24. The Project VPC router sends approved remote destinations through two managed routing gateway replicas in active and standby mode. Those gateways exchange the Project CIDR and approved prefix 198.51.100.0/24 over eBGP with an external router or firewall. Other traffic continues through the Project's existing default gateway to the Internet. If no managed gateway has a healthy approved route, remote-destination traffic fails closed instead of falling through to the Internet path.eBGPapproved routePROJECT PRODUCTION · VPC 10.0.0.0/24KUBE-DC ROUTINGROUTED DOMAINWorkloadsPods + VMsVPC routerapproved routesdefault separateBGP pairtwo replicasactive · standbyEdge peerrouter / FWmanaged policyRemote CIDR198.51.100.0/24Default pathexisting gatewayInternetSNAT unchangedSeparate paths by destinationApproved remote destinations fail closed; other traffic keeps the default Internet path.
A whole Project VPC—not a second workload interface—reaches only operator-approved remote prefixes through redundant managed gateways. BGP remains platform-managed, while the Project's default Internet path stays unchanged.

An Organization-authorized attachment applies to the whole Project VPC. Only approved destinations use the managed BGP path; ordinary Internet traffic continues through the existing Project gateway.

Inbound via Gateway Route (HTTPS)

Gateway Route request pathA client resolves the configured application hostname in DNS and connects to the shared Envoy Gateway on port 443. Envoy terminates TLS using the Project certificate, a Gateway API HTTPRoute matches the hostname, and the selected backend Service forwards to the Pod.ClientHTTPSDNSapp hostnameEnvoy:443TLSHTTPRoutehostnamematchServicebackendPodapplication
DNS brings the client to the shared Envoy listener, where TLS terminates and an HTTPRoute selects the Project Service and Pod by hostname.

One shared Envoy Gateway handles HTTPS traffic. By default, each Service receives a hostname in the form <service>-<workload-namespace>.<base-domain>. Before creating an HTTPS route, create the namespaced letsencrypt Issuer described in Service Exposure.

Inbound via EIP + LoadBalancer

EIP and LoadBalancer ingressAn external client connects to a dedicated external IP on a declared TCP or UDP port. Kube-OVN load-balancer rules associated with the LoadBalancer Service translate and forward that traffic to the selected Pod or virtual-machine endpoint.ClientTCP or UDPDedicated EIPdeclared portsOVN load balancerService rulesPod or VMselectedendpoint
A dedicated EIP receives declared TCP or UDP ports and the OVN load balancer forwards them to the selected Pod or virtual-machine endpoint.

The EIP is bound to a LoadBalancer Service and supports any declared TCP or UDP service port.

Inbound via Floating IP

A FIP maps an external address to a VM or selected internal IP. Reachability remains subject to platform controls and the guest or workload firewall.

The Floating IP belongs to Project production in Organization acme. Its resource is stored in the Project's acme-production backing namespace, while the public address remains mapped at the platform edge rather than configured inside the guest.

Floating IP to virtual machine relationshipExternal traffic reaches Floating IP ubuntu-fip with example public address 203.0.113.10 in Organization acme and Project production. Bidirectional one-to-one NAT across all ports maps that address to private address 10.0.0.153 on VM ubuntu.1:1 NAT · all portsORGANIZATION: ACMEPROJECT: PRODUCTION · BACKING NAMESPACE ACME-PRODUCTIONExternalroutedFIP ubuntu-fip203.0.113.10PUBLICVM ubuntu10.0.0.153vpc_net_0The public address is mapped at the platform edge, not configured in the guest.The VM keeps its private address; firewall controls still apply.
The Floating IP remains a platform resource. OVN maps it bidirectionally to the VM's existing private interface; the public address is not configured inside the guest.

Network MTU (1400)

Kube-DC Cloud Project networks use an encapsulated overlay, so the usable MTU inside a project is 1400 bytes, not the 1500 you may be used to. Your VMs and pods are configured with this automatically — a VM's interface picks up 1400 over DHCP, and pods get it from the network plugin. You normally never need to think about it.

Self-managed installations may use a different overlay MTU. Check the workload interface with ip link show and use your installation's actual value before hard-coding runtime settings.

The exception is software that assumes 1500 and doesn't inherit the MTU from its host — most commonly Docker. If you install Docker inside a VM, its default bridge is created with an MTU of 1500. Containers on that bridge then send packets too large for the 1400 network, and those packets are silently dropped.

This produces a distinctive failure: small requests succeed, large transfers hang and then fail.

# Succeeds — a small response fits
RUN curl -v https://github.com/example/repo

# Fails — bulk data does not
RUN git clone --depth 1 https://github.com/example/repo /src
error: RPC failed; curl 56 Recv failure: Connection reset by peer
fatal: expected flush after ref listing

It looks like a broken network, but connectivity is fine — only the oversized packets are lost. docker pull, apt-get, npm install and similar can fail the same way.

Which side is at fault?

Run the failing command directly on the VM, outside Docker:

ResultCauseFix
Works on the VM, fails in DockerDocker's container MTUSet Docker's MTU (below)
Fails on the VM tooThe VM's own interfaceCheck ip link show — it should report mtu 1400

Fix: set Docker's MTU

Create or edit /etc/docker/daemon.json inside the VM:

{
"mtu": 1400
}

Then restart Docker:

sudo systemctl restart docker

Verify a container now gets the right MTU:

# Should print 1400. Before the fix it prints 1500.
docker run --rm alpine ip link show eth0

# The VM itself should already show 1400
ip link show

If you build with BuildKit or docker buildx, recreate the builder after changing the daemon config so it picks up the new MTU — or build with --network=host so build steps use the VM's interface directly.

Other container runtimes take the same setting: Podman uses mtu in its network config, and standalone containerd/CNI sets it in the bridge plugin config.

Managing Networking via UI

The Console UI provides a Networking section with three tabs for managing network resources:

Network Management UI

  • External IPs — view and create EIPs, see network type (Cloud/Public), ownership, and status
  • Floating IPs — manage FIP-to-VM mappings
  • Load Balancers — view LoadBalancer services and their endpoints

Use the + Create External IP button to allocate a new EIP for your project.


Which Method Should I Use?

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.
MethodProtocolsTLSIP TypeBest For
Gateway RouteHTTP, HTTPS, TLS passthroughAutomatic for HTTPS through the configured IssuerSharedWeb apps, APIs
Floating IPAll TCP/UDP (all ports)NoneDedicatedVM direct access
EIP + LoadBalancerAny TCP/UDPApplication handlesDedicated or sharedCustom services

Next Steps