Skip to content

Latest commit

 

History

History
 
 

remote-nsmgr-death

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Remote NSMgr death

This example shows that NSM keeps working after the remote NSMgr death.

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/remote-nsmgr-death/remote-nse?ref=34e1f2476dbc21097ab0a50348a966fd58b79985

Wait for applications ready:

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

Ping from NSC to NSE:

kubectl exec pods/alpine -n ns-remote-nsmgr-death -- ping -c 4 172.16.1.100

Ping from NSE to NSC:

kubectl exec deployments/nse-kernel -n ns-remote-nsmgr-death -- ping -c 4 172.16.1.101

Kill remote NSMgr:

kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/heal/remote-nsmgr-death/nsmgr-death?ref=34e1f2476dbc21097ab0a50348a966fd58b79985

Start local NSE instead of the remote one:

kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/heal/remote-nsmgr-death/local-nse?ref=34e1f2476dbc21097ab0a50348a966fd58b79985

Wait for the new NSE to start:

kubectl wait --for=condition=ready --timeout=1m pod -l nse-version=local -n ns-remote-nsmgr-death

Find new NSE pod:

NEW_NSE=$(kubectl get pods -l nse-version=local -n ns-remote-nsmgr-death --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')

Ping from NSC to new NSE:

kubectl exec pods/alpine -n ns-remote-nsmgr-death -- ping -c 4 172.16.1.102

Ping from new NSE to NSC:

kubectl exec ${NEW_NSE} -n ns-remote-nsmgr-death -- ping -c 4 172.16.1.103

Cleanup

Restore NSMgr setup:

kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/apps/nsmgr?ref=34e1f2476dbc21097ab0a50348a966fd58b79985 -n nsm-system

Delete ns:

kubectl delete ns ns-remote-nsmgr-death