Skip to content
Snippets Groups Projects
Commit 3b35b95c authored by Alejandro Tjaarda's avatar Alejandro Tjaarda
Browse files

examples: updated to latest api

parent 64d0b1a4
No related branches found
No related tags found
1 merge request!2repo: added new directory where utils scripts will be
......@@ -3,6 +3,10 @@
This example demonstrates the isolation of traffic between pods using custom networks with L2S-M. In this scenario, two networks, v-network-1 and v-network-2, are created, and three pods (cdn-server, router, and content-server) are connected. The objective is to showcase how traffic can be isolated through a router connecting the two networks.
## Pre-requisites
In order to get this example moving, it's required to have L2S-M installed alongside an overlay topology deployed. You can learn how to do so in [the overlay example section](../overlay-setup).
## Topology
This example can be seen in action [in the screencast provided](#procedure), where it's presented a Cluster scenario with three nodes, where a Pod will be deployed in each Node, as shown in the following figure:
......@@ -10,6 +14,7 @@ This example can be seen in action [in the screencast provided](#procedure), whe
<img src="../../assets/video-server-example.svg" width="400">
</p>
The following example doesn't really need a three Node scenario, it can be used with just a Node in the Cluster. Through the example guide, we will create the following resources:
### Networks
......@@ -39,6 +44,8 @@ Note: The configurations specified can be seen in each Pod YAML specification.
- IP: 10.0.2.2
- Network: v-network-2
It's required to specify which node you want to schedule your pod in, in order to do so, change the "NodeName" field inside the yaml files.
## Procedure
Follow the steps below to demonstrate the isolation of traffic between pods using custom networks with L2S-M. You can watch a screencast of how this operates and how it should follow through this youtube video:
......
......@@ -4,6 +4,7 @@ metadata:
name: cdn-server
labels:
app: test4
l2sm: "true"
annotations:
l2sm/networks: '[{"name": "v-network-1", "ips":["10.0.1.2/24"]}]'
spec:
......@@ -14,4 +15,4 @@ spec:
securityContext:
capabilities:
add: ["NET_ADMIN"]
#nodeName: test-l2sm-uc3m-polito-1
nodeName: test-l2sm-uc3m-polito-1
......@@ -22,4 +22,4 @@ spec:
securityContext:
capabilities:
add: ["NET_ADMIN"]
#nodeName: test-l2sm-uc3m-polito-3
\ No newline at end of file
nodeName: test-l2sm-uc3m-polito-3
\ No newline at end of file
......@@ -4,6 +4,7 @@ metadata:
name: router
labels:
app: test4
l2sm: "true"
annotations:
l2sm/networks: '[{"name": "v-network-1","ips": ["10.0.1.1/24"]}, {"name": "v-network-2","ips": ["10.0.2.1/24"]}]'
spec:
......@@ -17,5 +18,5 @@ spec:
privileged: true
capabilities:
add: ["NET_ADMIN"]
#nodeName: test-l2sm-uc3m-polito-2
nodeName: test-l2sm-uc3m-polito-2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment