Network Stack Overview
Talos networking consists of several layers that work together:Network Configuration
Network configuration is declared in the machine config and managed by Talos controllers.Basic Interface Configuration
Advanced Configurations
VLAN Configuration
VLAN Configuration
Bond Configuration
Bond Configuration
Bridge Configuration
Bridge Configuration
Wireguard VPN
Wireguard VPN
Network Resource Management (COSI)
Talos manages network state through COSI resources in thenetwork namespace.
Key Network Resources
| Resource Type | Purpose | Example |
|---|---|---|
AddressSpec | Desired IP addresses | Interface addresses, VIPs |
AddressStatus | Current IP addresses | Actual configured addresses |
RouteSpec | Desired routes | Static routes, default gateway |
RouteStatus | Current routing table | Active kernel routes |
LinkSpec | Interface configuration | MTU, bonding, VLANs |
LinkStatus | Interface state | Link up/down, speed, duplex |
HostnameSpec | Hostname configuration | Node hostname |
HostnameStatus | Current hostname | Resolved hostname |
ResolverSpec | DNS configuration | Nameservers, search domains |
NodeAddress | Node addresses | Filtered addresses for k8s |
Network Controllers
Talos runs multiple controllers to reconcile network state:- AddressConfigController - Applies IP addresses to interfaces
- RouteConfigController - Manages routing table
- LinkConfigController - Configures interface properties
- HostnameConfigController - Sets system hostname
- ResolverConfigController - Manages DNS resolution
- EtcFileController - Generates /etc/hosts and /etc/resolv.conf
DNS Resolution
DNS Configuration
DNS Resolution Flow
- Application queries DNS
- systemd-resolved (if enabled) or direct resolution
- Nameservers from machine config or DHCP
- Search domains applied automatically
- Response returned to application
Talos generates
/etc/resolv.conf and /etc/hosts dynamically from network resources. Manual edits are not persisted.CNI (Container Network Interface)
Talos supports any standard CNI plugin for Kubernetes pod networking.CNI Architecture
Popular CNI Plugins with Talos
Cilium
eBPF-based networking with observability
- High performance
- Network policies
- Service mesh (optional)
- Hubble observability
Calico
Network policy and security
- BGP routing
- Network policies
- WireGuard encryption
- eBPF dataplane option
Flannel
Simple overlay networking
- Easy setup
- VXLAN or host-gw
- Lightweight
- Good for small clusters
Multus
Multiple network interfaces
- Multiple CNIs per pod
- SR-IOV support
- DPDK support
- Network selection
CNI Configuration Location
CNI configurations are stored in/etc/cni/net.d/ and managed by your CNI provider:
Service Discovery
Kubernetes Service Types
Talos supports all Kubernetes service types:ClusterIP Services
- Virtual IP managed by kube-proxy or CNI
- Only accessible within cluster
- Load balanced to endpoints
NodePort Services
<NodeIP>:30080
LoadBalancer Services
Requires a LoadBalancer controller (MetalLB, cloud provider):ExternalName Services
DNS CNAME for external services:Load Balancing
MetalLB with Talos
MetalLB provides LoadBalancer services in bare metal environments:- Layer 2 Mode - Responds to ARP requests
- BGP Mode - Announces routes via BGP
Virtual IP (VIP) Configuration
Talos supports Virtual IPs for high availability:- Equinix Metal - API-managed VIP
- HCloud - Hetzner Cloud floating IP
- Layer 2 - Standard VRRP/ARP-based VIP
Service Mesh Integration
Talos is fully compatible with service mesh implementations.Istio
Istio works seamlessly with Talos:- CNI plugin compatible with Istio CNI
- Proper network policies configured
- Ingress gateway exposed via LoadBalancer or NodePort
Linkerd
Linkerd lightweight service mesh:Cilium Service Mesh
Cilium provides integrated service mesh:Firewall Configuration
Talos supports nftables-based firewall rules:Default Ports
| Port | Service | Access |
|---|---|---|
| 50000 | Talos API (apid) | Configure as needed |
| 50001 | trustd | Control plane only |
| 6443 | Kubernetes API | Load balancer / external |
| 2379-2380 | etcd | Control plane only |
| 10250 | kubelet | Cluster internal |
| 10251 | kube-scheduler | Localhost only |
| 10252 | kube-controller | Localhost only |
| 10256 | kube-proxy | Metrics |
Firewall rules are evaluated in order. The first matching rule determines the action.
Network Policies
Kubernetes Network Policies control pod-to-pod communication:IPv6 Support
Talos supports dual-stack IPv4/IPv6 networking:Dual-Stack Kubernetes
Enable dual-stack in cluster config:Network Troubleshooting
Diagnostic Commands
Common Issues
Pods Can't Reach Internet
Pods Can't Reach Internet
- Check default route:
talosctl routes - Verify DNS:
talosctl get resolvers - Check NAT/masquerading in CNI config
- Verify firewall rules don’t block outbound
Pod-to-Pod Communication Fails
Pod-to-Pod Communication Fails
- Check CNI plugin status:
kubectl get pods -n kube-system - Verify pod CIDR doesn’t conflict with node network
- Check network policies:
kubectl get networkpolicies - Verify MTU settings match across infrastructure
Can't Access Talos API
Can't Access Talos API
- Verify mTLS certificates:
talosctl version - Check firewall rules allow port 50000
- Verify network connectivity:
ping <node-ip> - Check apid service:
talosctl service apid
LoadBalancer Service Pending
LoadBalancer Service Pending
- Verify LoadBalancer controller installed:
kubectl get pods -n metallb-system - Check controller logs
- Verify IP pool configuration
- Check Layer 2 mode announces ARP correctly
Network Performance
Optimization Tips
-
MTU Configuration - Set MTU to 9000 for 10GbE networks:
- RSS (Receive Side Scaling) - Enable for multi-queue NICs
-
CNI Selection - Choose based on needs:
- Highest performance: Cilium eBPF or Calico eBPF
- Simplicity: Flannel
- Features: Cilium with Hubble
- Network Policies - Can impact performance, use sparingly
-
Kernel Parameters - Tune for high throughput:
Best Practices
Use Static IPs
For control plane nodes, use static IP addresses to avoid DNS dependencies during bootstrap
Separate Networks
Use separate networks for management (Talos API) and data plane (Kubernetes)
Enable Network Policies
Implement network policies for zero-trust security between pods
Monitor MTU
Ensure consistent MTU across all infrastructure to avoid fragmentation
Plan IP Ranges
Allocate sufficient IP ranges for pods and services before deployment
Document Firewall Rules
Keep firewall rules documented and minimal for security and troubleshooting
Next Steps
CNI Installation
Install and configure CNI plugins
Load Balancer Setup
Configure MetalLB or cloud load balancer
VIP Configuration
Set up Virtual IP for control plane HA
Security Model
Learn about Talos network security