Skip to content

Latest commit

 

History

History

select-forwarder

Select forwarder by capability example

The example demonstrates how can be declareded forwarder selection in network service.

Important points:

  • client requests select-forwarder service.
  • forwarder registers itself with label my_forwarder_capability: true
  • network service declaretes network service select-forwarder that contains match for label my_forwarder_capability: true
  • network service-endpoint registers as an endpoint for service select-forwarder

See at example resources in kustomization.yaml

Requires

Make sure that you have completed steps from basic setup.

Run

Apply example resources:

kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/select-forwarder?ref=c91be29099fab1f8376d9ff90c858efd829de35e

Wait for applications ready:

kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-select-forwarder
kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-select-forwarder

Ping from NSC to NSE:

kubectl exec pods/alpine -n ns-select-forwarder -- ping -c 4 169.254.0.0

Ping from NSE to NSC:

kubectl exec deployments/nse-kernel -n ns-select-forwarder -- ping -c 4 169.254.0.1

Verify that NSMgr selected the correct forwarder:

kubectl logs pods/alpine -c cmd-nsc -n ns-select-forwarder | grep "my-forwarder-vpp"

Cleanup

kubectl delete ns ns-select-forwarder