Skip to content

Latest commit

 

History

History

annotated-namespace

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Test kernel to kernel connection with annotated namespace

This example shows that NSM annotations applied to namespace will be applied to the pods within this namespace.

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

Create test namespace and deploy NSE:

kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/features/annotated-namespace?ref=7d9096404c273143d4925deaabb991e705909289

Wait for NSE to be ready:

kubectl wait --for=condition=ready --timeout=1m pod -l app=nse-kernel -n ns-annotated-namespace

Annotate namespace with NSM annotation:

kubectl annotate ns ns-annotated-namespace networkservicemesh.io=kernel://annotated-namespace/nsm-1

Apply client patch:

kubectl apply -f https://raw.githubusercontent.com/networkservicemesh/deployments-k8s/7d9096404c273143d4925deaabb991e705909289/examples/features/annotated-namespace/client.yaml

Wait for client to be ready:

kubectl wait --for=condition=ready --timeout=1m pod -l app=alpine -n ns-annotated-namespace

Ping from NSC to NSE:

kubectl exec deployments/alpine -n ns-annotated-namespace -- ping -c 4 172.16.1.100

Ping from NSE to NSC:

kubectl exec deployments/nse-kernel -n ns-annotated-namespace -- ping -c 4 172.16.1.101

Cleanup

Delete ns:

kubectl delete ns ns-annotated-namespace