Skip to content

Latest commit

 

History

History
 
 

remote-nse-death

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Remote NSE death

This example shows that NSM keeps working after the remote NSE 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-nse-death/nse-before-death?ref=34e1f2476dbc21097ab0a50348a966fd58b79985

Wait for applications ready:

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

Find NSC and NSE pods by labels:

NSC=$(kubectl get pods -l app=alpine -n ns-remote-nse-death --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
NSE=$(kubectl get pods -l app=nse-kernel -n ns-remote-nse-death --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')

Ping from NSC to NSE:

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

Ping from NSE to NSC:

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

Apply patch. It recreates NSE with a new label:

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

Wait for new NSE to start:

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

Find new NSE pod:

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

Ping from NSC to new NSE:

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

Ping from new NSE to NSC:

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

Cleanup

Delete ns:

kubectl delete ns ns-remote-nse-death