This example shows that NSM keeps working after the remote NSMgr 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.
Make sure that you have completed steps from basic or memory setup.
Deploy NSC and NSE:
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/heal/remote-nsmgr-restart?ref=e314a602db2c49c65e3e6de41e7f113c70bac3c3
Wait for applications ready:
kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-remote-nsmgr-restart
kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-remote-nsmgr-restart
Ping from NSC to NSE:
kubectl exec pods/alpine -n ns-remote-nsmgr-restart -- ping -c 4 172.16.1.100
Ping from NSE to NSC:
kubectl exec deployments/nse-kernel -n ns-remote-nsmgr-restart -- ping -c 4 172.16.1.101
Find nse node:
NSE_NODE=$(kubectl get pods -l app=nse-kernel -n ns-remote-nsmgr-restart --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 wait for it to start:
kubectl delete pod ${NSMGR} -n nsm-system
kubectl wait --for=condition=ready --timeout=1m pod -l app=nsmgr --field-selector spec.nodeName==${NSE_NODE} -n nsm-system
Ping from NSC to NSE:
kubectl exec pods/alpine -n ns-remote-nsmgr-restart -- ping -c 4 172.16.1.100
Ping from NSE to NSC:
kubectl exec deployments/nse-kernel -n ns-remote-nsmgr-restart -- ping -c 4 172.16.1.101
Delete ns:
kubectl delete ns ns-remote-nsmgr-restart