Skip to content

Latest commit

 

History

History

registry-local-endpoint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Registry + Local NSE restart

This example shows that NSM keeps working after the Registry and local NSE restart.

NSC and NSE are using the kernel mechanism to connect to its local forwarder.

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-local-endpoint/nse-first?ref=c91be29099fab1f8376d9ff90c858efd829de35e

Wait for applications ready:

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

Ping from NSC to NSE:

kubectl exec pods/alpine -n ns-registry-local-endpoint -- ping -c 4 172.16.1.100

Ping from NSE to NSC:

kubectl exec deployments/nse-kernel -n ns-registry-local-endpoint -- ping -c 4 172.16.1.101

Find Registry:

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

Restart Registry:

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

Restart NSE. This command recreates NSE with a new label:

kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/heal/registry-local-endpoint/nse-second?ref=c91be29099fab1f8376d9ff90c858efd829de35e

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=nse-kernel -l version=new -n ns-registry-local-endpoint

Find new NSE pod:

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

Ping from NSC to new NSE:

kubectl exec pods/alpine -n ns-registry-local-endpoint -- ping -c 4 172.16.1.102

Ping from new NSE to NSC:

kubectl exec ${NEW_NSE} -n ns-registry-local-endpoint -- ping -c 4 172.16.1.103

Cleanup

Delete ns:

kubectl delete ns ns-registry-local-endpoint