Spiderpool Documentation

repository·main·Indexed 20 days ago

https://github.com/spidernet-io/spiderpool

A CNCF sandbox project providing an IP Address Management (IPAM) CNI plugin for Kubernetes underlay and RDMA networks. Optimized for high-performance, low-latency workloads like AI and storage, it supports CNI plugins including macvlan, ipvlan, sriov, vlan, ovs, spiderflat, and Multus.

Tokens
266.2K
Snippets
605
Records
908
Agent score
69%

What's inside Spiderpool

  1. What is Spiderpool?

    main

    Spiderpool is a CNCF Sandbox project that provides an underlay and RDMA networking solution for Kubernetes. It enhances the capabilities of existing CNIs like Macvlan, ipvlan, and SR-IOV, allowing them to run effectively on bare metal, virtual machines, and public clouds.

    It is designed for network I/O intensive and low-latency applications, such as storage, middleware, and AI training, by providing high throughput and low latency through direct access to the host's L2 network, avoiding the overhead of tunnel encapsulation found in overlay networks.

  2. What is Spiderpool

    main

    Spiderpool is an IP Address Management (IPAM) CNI plugin designed to assign IP addresses for Kubernetes clusters. Unlike overlay CNIs (like Cilium or Calico) that manage their own IPAM, Spiderpool is specifically designed for use with underlay networks where administrators require precise, manual management of each IP address.

    It is compatible with any CNI plugin that supports third-party IPAM plugins, including:

    • macvlan CNI
    • vlan CNI
    • ipvlan CNI
    • sriov CNI
    • ovs CNI
    • spiderflat
    • Multus CNI (specifically for assigning IPs to multiple interfaces)
  3. Introduction to Spiderpool

    main

    Spiderpool is a CNCF sandbox project providing an underlay and RDMA network solution for Kubernetes. It is designed to run on bare metal, virtual machines, and public cloud environments.

    It enhances the capabilities of existing CNIs like Macvlan, ipvlan, and SR-IOV to deliver high-performance networking for I/O-intensive and low-latency applications such as storage, middleware, and AI workloads.

  4. Review the Spiderpool feature roadmap

    main

    The Spiderpool roadmap outlines the development lifecycle (Alpha, Beta, GA) for various networking features. Key functional areas include:

    • SpiderIppool: IP settings, affinity (namespace, application, nodename), and default ippool configurations.
    • SpiderSubnet: Automated ippool creation, scaling, and deletion, as well as support for various Kubernetes workloads (Deployment, StatefulSet, etc.).
    • Fixed IP: Support for fixed IPs in StatefulSets, Deployments, and KubeVirt, including integration with Calico and Weave.
    • Spidermultusconfig: Support for various CNI types like macvlan, ipvlan, sriov, ovs-cni, and chain cni.
    • SpiderCoordinator: Synchronization of podCIDR for Calico/Cilium and support for underlay/overlay modes.
    • Advanced Networking: RDMA support (RoCE/Infiniband), Dual Stack, EgressGateway, and eBPF implementations.
    • Observability & Policy: eBPF pod stats and Network Policy support for ipvlan/macvlan/sriov.

    Refer to the roadmap table for specific version milestones for each feature.

  5. Major Features of Spiderpool

    main

    Spiderpool provides a comprehensive suite of networking features:

    • Simplified Installation: Streamlines the setup by encapsulating relevant CRDs and reducing the need to manually install components like Multus, RDMA, or SR-IOV.
    • CRD-based Dual-stack IPAM: Supports exclusive and shared IP pools with various affinity settings. It allows for static IP assignment (for stateful apps like MySQL or Redis) and fixed ranges for stateless apps. It also supports binding/releasing cloud-side IPs via generic IaaS Network Providers.
    • Multiple Network Interfaces: Enables Pods to have multiple underlay interfaces or a combination of overlay and underlay interfaces, managing policy routing to prevent packet loss.
    • Enhanced Connectivity: Establishes seamless connectivity between Pods and host machines (improving health checks) and supports service access via kube-proxy or eBPF-based replacements.
    • eBPF Enhancements: Uses eBPF-based kube-proxy replacement to accelerate service access and socket short-circuiting to improve local Pod-to-Pod communication efficiency (up to 25% lower delay and 50% higher throughput).
    • RDMA Support: Provides RoCE and InfiniBand solutions where Pods can use RDMA devices in shared or exclusive modes.
    • Dual-stack Support: Supports IPv4-only, IPv6-only, and dual-stack environments.
  6. Features of EgressGateway in Spiderpool environments

    main

    When used with Spiderpool, EgressGateway provides several advanced networking capabilities:

    • Dual-stack support: Solves IPv4/IPv6 connectivity issues.
    • High Availability: Ensures egress connectivity remains stable even if an Egress Node fails.
    • Fine-grained control: Supports filtering Pods' Egress policies, including specific Destination CIDR.
    • Application-level control: Allows precise management of outbound traffic for specific Egress applications (Pods).
    • Multi-instance support: Handles communication between multiple network partitions or clusters.
    • Namespaced Egress IP: Supports assigning egress IPs at the namespace level.
    • Automatic detection: Automatically detects cluster traffic for egress gateway policies.
    • Namespace defaults: Supports namespace-default egress instances.
    • Compatibility: Works with low kernel versions, making it suitable for various Kubernetes deployment environments.
  7. What is Spiderpool and its core components?

    main

    Spiderpool is a project composed of several plugins designed for network management in container environments. Its primary components are:

    • spiderpool: An IPAM (IP Address Management) plugin that works with a CNI main plugin to manage IP addresses for containers.
    • coordinator: A plugin used to coordinate routes. It is typically used via CNI plugin chaining and is optional.
    • ifacer: A plugin that helps create VLAN sub-interfaces or bond interfaces. Like the coordinator, it is used in CNI plugin chaining and is optional.
  8. Overview of RDMA networking for AI clusters in Spiderpool

    main

    Spiderpool provides RDMA (Remote Direct Memory Access) capabilities to containers in AI cluster scenarios, supporting both RoCE and Infiniband protocols. RDMA is essential for large-scale AI training to overcome TCP/IP limitations such as high latency, high CPU overhead, and bandwidth bottlenecks by enabling zero-copy, kernel bypass, and hardware offloading.

    Supported Protocols

    • RoCE (RDMA over Converged Ethernet): Runs on Ethernet networks. Requires network capabilities like DCB/PFC/ECN for low packet loss. Supported by both Shared (Macvlan) and Isolated (SR-IOV) schemes.
    • Infiniband: Runs on dedicated Infiniband networks. Relies on a Subnet Manager (e.g., OpenSM). Supported only by the Isolated (SR-IOV) scheme.
  9. What is a ReservedIP and why use it?

    main

    The SpiderReservedIP Custom Resource (CR) allows you to reserve specific IP addresses for the entire Kubernetes cluster, ensuring they are never allocated by the IPAM (IP Address Management) plugin.

    This is useful for:

    • Avoiding IP conflicts: Preventing the cluster from using IPs already assigned to external hosts outside the cluster.
    • Network Planning: Explicitly protecting subnet IPs or broadcast IPs from being utilized for Pod network communication.

    Even if these IPs are included in a SpiderIPPool definition, the IPAM plugin will skip them during allocation.

  10. What is SpiderMultusConfig

    main

    SpiderMultusConfig is a Custom Resource (CR) provided by Spiderpool that automatically manages Multus NetworkAttachmentDefinition CRs. It acts as an abstraction layer over the standard Multus CNI configuration to solve several pain points:

    • Automated JSON Generation: Instead of manually writing error-prone JSON strings for Multus CRs, you define the configuration in the SpiderMultusConfig spec, and it automatically generates the corresponding Multus CR.
    • Self-Healing: If a Multus CR is accidentally deleted, SpiderMultusConfig will automatically recreate it, improving operational fault tolerance.
    • Simplified Configuration: It supports a wide range of CNI types (Macvlan, IPvlan, Vlan, Ovs, SR-IOV) and provides a better user experience by reducing the need to look up complex CNI configuration parameters.
    • Validation: It uses a Webhook mechanism to catch configuration errors early, reducing troubleshooting costs.
    • Spiderpool Integration: It provides enhanced configuration experiences for Spiderpool-specific CNI plugins like ifacer and coordinator.
    • IPPool Validation: For SR-IOV CNI, it validates that the IPPools configured in the Pod match the subnet of the host's network interface PF (Physical Function), preventing communication failures caused by IP mismatch.