NSM components
Table of contents
NSM gRPC Services
- NetworkService is used for requesting and closing network connections between clients and endpoints.
Proto File: https://github.com/networkservicemesh/api/blob/main/pkg/api/networkservice/networkservice.proto
|
|
- Registry is used for registering and unregistering Network Services and Network Service Endpoints in NSM, as well as for searching.
Proto File: https://github.com/networkservicemesh/api/blob/main/pkg/api/registry/registry.proto
|
|
- MonitorConnection service is used for monitoring or searching connections with a specific selector.
Proto File: https://github.com/networkservicemesh/api/blob/main/pkg/api/networkservice/connection.proto
|
|
Network Service Manager (NSMgr)
Network Service Manager is one of the key components of NSM, which is responsible for discovering Network Services and Network Service Endpoints and processing requests from clients. It must be located on the same machine as the NSM client in order to provide it with a connection to the NSM network. It can also serve as a registry if there is no real registry.
Package: https://github.com/networkservicemesh/cmd-nsmgr/pkgs/container/cmd-nsmgr
Implements services:
- NetworkService
- Registry
- MonitorConnection
Responsibilities:
- NetworkService discovery
- Forwarder discovery
- Storage for valid connections from clients
- Provides access to the network namespace of the clients and endpoints for the forwarder
- Can serve as a registry (optional)
Forwarder
Forwarder is one of the datapath providers in NSM. Its main responsibility is to configure network interfaces requested by NSM clients.
Implements services:
- NetworkService
Responsibilities:
- Creates client-side and endpoint-side interfaces
- Chooses mechanism types for connections between clients and endpoints
- Collects stats from interfaces
- Load-balancing for endpoints beloning to the same Network Service
- Fills in the
ConnectionContext
for the connection
|
|
- Connects with other forwarders located in other NSM domains
Forwarder VPP
Forwarder VPP uses VPP Framework as a backend to create network interfaces.
Package: https://github.com/networkservicemesh/cmd-forwarder-vpp/pkgs/container/cmd-forwarder-vpp
Forwarder OVS
Forwarder OVS uses Open vSwitch (OVS) as a backend to create network interfaces.
Package: https://github.com/networkservicemesh/cmd-forwarder-ovs/pkgs/container/cmd-forwarder-ovs
Registry
Registry is used as a storage for Network Service and Network Service Endpoint entries.
Package: https://github.com/networkservicemesh/cmd-registry-k8s/pkgs/container/cmd-registry-k8s
Implements services:
- Registry
Responsibilities:
- Stores Network Service and Network Service Endpoint entries
- Calculates expiration time for Network Service Endpoints and deletes expired ones
- Proxies interdomain queries to Registry Proxy if it’s presented on the cluster
Registry proxy DNS
Registry proxy DNS resolves IPs of remote registries in other NSM domains and proxies Register, Unregister and Find requests to those registries.
Package: https://github.com/networkservicemesh/cmd-registry-proxy-dns/pkgs/container/cmd-registry-proxy-dns
Implements services:
- Registry
Responsibilities:
- Resolves IPs of remote registries using names of Network Services and Network Service Endpoints
- Changes Network Service Endpoint URLs to DNS target of Network Service Manager Proxy on Register, Unregister and Find requests
- Proxies local queries to the Registry on the cluster
Network Service Manager Proxy (NSMgr Proxy)
Network Service Manager Proxy allows NSM to establish connections between clients and endpoints located in different NSM domains. This component is used for proxing connection requests to other Network Service Manager Proxies located in other NSM domains.
Package: https://github.com/networkservicemesh/cmd-nsmgr-proxy/pkgs/container/cmd-nsmgr-proxy
Implements services:
- NetworkService
- MonitorConnection
Responsibilities:
- Swaps endpoint’s local IP to domain’s external IP
- Translates Network Service and Network Service Endpoint names in the connection into names suitable for other NSM domains
Admission Webhook k8s
Admission Webhook K8s simplifies working with NSM if NSM is deployed in a Kubernetes cluster. This component automatically injects NSM clients into Kubernetes pods with NSM annotations. It can also inject NSM clients into entire pod namespaces.
Responsibilities:
- Injects NSM Clients into Kubernetes pods if they have an NSM annotation
- Injects NSM Clients into all Kubernetes pods in a namespace if this namespace has an NSM annotation
Cluster Info K8s
Cluster Info K8s allows NSM to work with cluster properties: https://github.com/kubernetes-sigs/about-api. This component can be used to simplify retrieval of the cluster domain name for Network Service Manager Proxy.
Package: https://github.com/networkservicemesh/cmd-cluster-info-k8s/pkgs/container/cmd-cluster-info-k8s
Responsibilities:
- Obtains and updates information about the Kubernetes Cluster
Exclude Prefixes K8s
Exclude Prefixes K8s collects prefixes from various sources in the Kubernetes Cluster including pods, services and config maps. These prefixes are used by NSM IPAM to avoid the intersection of prefixes of NSM and Kubernetes networks.
Responsibilities:
- Obtains and updates prefixes used in the Kubernetes Cluster
Map IP K8s
Map IP K8s builds and updates a map that transfers internal pods' IPs of the Kubernetes Cluster to the external nodes' IPs. This map is used by Network Service Manager Proxy for interdomain NSM scenarios when NSM is deployed in the Kubernetes Cluster.
Package: https://github.com/networkservicemesh/cmd-map-ip-k8s/pkgs/container/cmd-map-ip-k8s
Responsibilities:
- Builds and updates a map that transfers internal pods' IPs to external nodes' IPs
Network Service Endpoint (NSE)
Network Service Endpoint provides NSM clients with access to Network Services.
Package: https://github.com/networkservicemesh/cmd-nse-icmp-responder/pkgs/container/cmd-nse-icmp-responder
Implements services:
- NetworkService
Responsibilities:
- Provides NSM clients with access to Network Services
- Fills in remaining connection properties like IP, hardware addresses, and DNS configurations for the user’s goals.
Network Service Client (NSC)
Network Service Client allows external workloads to request access to NSM’s Network Services and maintains connections (Controlplane and Dataplane healing). This component can also provide a local DNS Server for accessing NSM resources by their names.
Package: https://github.com/networkservicemesh/cmd-nsc/pkgs/container/cmd-nsc
Responsibilities:
- Requests connections to Network Services
- Connection healing
- Can serve as a DNS Server
External Client
External Client is any workload which wants to connect to NSM’s Network Services. Network Service Client is required to establish the connection and should be located alongside External Client.
Network Service Client Init (NSC Init)
Network Service Client Init is used as Init Container inside Kubernetes pods with External Clients. Its main responsibility is to connect to Network Service before the main workload starts. Connection created by NSC Init is then used and maintained by NSC.
Package: https://github.com/networkservicemesh/cmd-nsc-init/pkgs/container/cmd-nsc-init
Responsibilities:
- Requests a connection to Network Service
Network Service Endpoint vl3 (NSE vl3)
Network Service Endpoint vl3 is used to build virtual L3 networks in NSM using VPP Framework. vl3 networks are very similar to the standard network in a Kubernetes Cluster. vl3 Endpoints route traffic between clients connected to the vl3 network. They can also be configured to provide DNS for connected clients.
Package: https://github.com/networkservicemesh/cmd-nse-vl3-vpp/pkgs/container/cmd-nse-vl3-vpp
Implements services:
- NetworkService
Responsibilities:
- Builds virtual L3 network
- Routes clients traffic over the vl3 network
- Provides a DNS Server
Table of contents