Skip to content

Latest commit

 

History

History

remote-nsmgr-remote-endpoint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Remote NSMgr + Remote NSE restart

This example shows that NSM keeps working after the remote NSMgr + remote NSE 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/remote-nsmgr-remote-endpoint/nsmgr-before-death?ref=7a2735f6f8c8ed02d058c1a6a2f04846a3d88cad

Wait for applications ready:

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

Ping from NSC to NSE:

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

Ping from NSE to NSC:

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

Find nse node:

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

Find remote NSMgr pod:

NSMGR=$(kubectl get pods -l app=nsmgr --field-selector spec.nodeName==${NSE_NODE} -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')

Restart remote NSMgr and NSE:

kubectl delete pod ${NSMGR} -n nsm-system
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/heal/remote-nsmgr-remote-endpoint/nsmgr-after-death?ref=7a2735f6f8c8ed02d058c1a6a2f04846a3d88cad

Waiting for new ones:

kubectl wait --for=condition=ready --timeout=1m pod -l app=nsmgr --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -l version=new -n ns-remote-nsmgr-remote-endpoint

Find new NSE pod:

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

Ping from NSC to new NSE:

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

Ping from new NSE to NSC:

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

Cleanup

Delete ns:

kubectl delete ns ns-remote-nsmgr-remote-endpoint