Skip to content

Latest commit

 

History

History
 
 

registry-remote-forwarder

Registry + Remote Forwarder restart

This example shows that NSM keeps working after the Registry + remote Forwarder restart.

NSC and NSE are using the kernel mechanism to connect to its local forwarder. Forwarders are using the vxlan mechanism to connect with each other.

Requires

Make sure that you have completed steps from basic or memory setup.

Run

Deploy NSC and NSE:

kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/heal/registry-remote-forwarder?ref=aad7c26ad32fb4c3b515179bbe85d59c811c52f1

Wait for applications ready:

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

Ping from NSC to NSE:

kubectl exec pods/alpine -n ns-registry-remote-forwarder -- ping -c 4 172.16.1.100

Ping from NSE to NSC:

kubectl exec deployments/nse-kernel -n ns-registry-remote-forwarder -- ping -c 4 172.16.1.101

Find nse node:

NSE_NODE=$(kubectl get pods -l app=nse-kernel -n ns-registry-remote-forwarder --template '{{range .items}}{{.spec.nodeName}}{{"\n"}}{{end}}')

Find Registry:

REGISTRY=$(kubectl get pods -l app=registry -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')

Find remote Forwarder:

FORWARDER=$(kubectl get pods -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')

Restart Registry and remote Forwarder:

kubectl delete pod ${REGISTRY} -n nsm-system
kubectl delete pod ${FORWARDER} -n nsm-system

Waiting for new ones:

kubectl wait --for=condition=ready --timeout=1m pod -l app=registry -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l 'app in (forwarder-ovs, forwarder-vpp)' --field-selector spec.nodeName==${NSE_NODE} -n nsm-system

Ping from NSC to NSE:

kubectl exec pods/alpine -n ns-registry-remote-forwarder -- ping -c 4 172.16.1.100

Ping from NSE to NSC:

kubectl exec deployments/nse-kernel -n ns-registry-remote-forwarder -- ping -c 4 172.16.1.101

Cleanup

Delete ns:

kubectl delete ns ns-registry-remote-forwarder