Skip to content

Commit 759c48d

Browse files
committed
initial commit
0 parents  commit 759c48d

File tree

7 files changed

+479
-0
lines changed

7 files changed

+479
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# KUBERNETES ALL THE NETLABS!!!
2+
3+
"kubernetlab" is basically just running
4+
[vrnetlab](https://github.com/plajjan/vrnetlab) on Kubernetes. There really
5+
isn't a whole bunch of magic required, just tying together services,
6+
deployments, and vrnetlab containers in a kubernetes-y way.
7+
8+
Ideally this ~must~ ~should~ might get fleshed out to suck in your inventory
9+
(Ansible, $other) and use that to determine the hosts to spin up as well as the
10+
links between nodes and then do any or all of:
11+
12+
* generate a dot graph for the deployment to use as the reference point
13+
* spit out the needed yaml for deployments, services, etc.
14+
* actually push the deployments to a k8s API endpoint of your choosing
15+
16+
For now, basic examples are provided with nxosv. I can't distribute packaged
17+
nxosv containers, so fix-up the docker registry path in the manifests as needed
18+
until I get around to making helm-type things happen.
19+
20+
The network-policy.yaml manifest is optional if you need/want to isolate your
21+
kubernetlab namespace from the rest of the world. I've found this to be helpful
22+
in cases where I want to test out deployments/scenarios using device names from a
23+
real/live environment but obviously want to avoid accidentally reaching out from
24+
inside the kubernetlab environment to the "real world".
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
apiVersion: apps/v1beta1
3+
kind: Deployment
4+
metadata:
5+
name: switch1
6+
spec:
7+
replicas: 1
8+
template:
9+
metadata:
10+
labels:
11+
app: nxosv
12+
role: switch1
13+
spec:
14+
containers:
15+
- name: switch1
16+
image: <DOCKER-REGISTRY>/vr-nxos:7.0.3.I6.1
17+
securityContext:
18+
privileged: true
19+
resources:
20+
requests:
21+
memory: "8500Mi"
22+
---
23+
apiVersion: apps/v1beta1
24+
kind: Deployment
25+
metadata:
26+
name: switch2
27+
spec:
28+
replicas: 1
29+
template:
30+
metadata:
31+
labels:
32+
app: nxosv
33+
role: switch2
34+
spec:
35+
containers:
36+
- name: switch2
37+
image: <DOCKER-REGISTRY>/vr-nxos:7.0.3.I6.1
38+
securityContext:
39+
privileged: true
40+
resources:
41+
requests:
42+
memory: "8500Mi"
Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
---
2+
kind: Service
3+
apiVersion: v1
4+
metadata:
5+
name: switch1
6+
labels:
7+
app: nxosv
8+
role: switch1
9+
spec:
10+
selector:
11+
app: nxosv
12+
role: switch1
13+
type: ClusterIP
14+
ports:
15+
- protocol: TCP
16+
name: ssh
17+
port: 22
18+
- protocol: UDP
19+
name: snmp
20+
port: 161
21+
- protocol: TCP
22+
name: https
23+
port: 443
24+
- protocol: TCP
25+
name: netconf
26+
port: 830
27+
- protocol: TCP
28+
name: qemu
29+
port: 5000
30+
- protocol: TCP
31+
name: port01
32+
port: 10001
33+
- protocol: TCP
34+
name: port02
35+
port: 10002
36+
- protocol: TCP
37+
name: port03
38+
port: 10003
39+
- protocol: TCP
40+
name: port04
41+
port: 10004
42+
- protocol: TCP
43+
name: port05
44+
port: 10005
45+
- protocol: TCP
46+
name: port06
47+
port: 10006
48+
- protocol: TCP
49+
name: port07
50+
port: 10007
51+
- protocol: TCP
52+
name: port08
53+
port: 10008
54+
- protocol: TCP
55+
name: port09
56+
port: 10009
57+
- protocol: TCP
58+
name: port10
59+
port: 10010
60+
- protocol: TCP
61+
name: port11
62+
port: 10011
63+
- protocol: TCP
64+
name: port12
65+
port: 10012
66+
- protocol: TCP
67+
name: port13
68+
port: 10013
69+
- protocol: TCP
70+
name: port14
71+
port: 10014
72+
- protocol: TCP
73+
name: port15
74+
port: 10015
75+
- protocol: TCP
76+
name: port16
77+
port: 10016
78+
- protocol: TCP
79+
name: port17
80+
port: 10017
81+
- protocol: TCP
82+
name: port18
83+
port: 10018
84+
- protocol: TCP
85+
name: port19
86+
port: 10019
87+
- protocol: TCP
88+
name: port20
89+
port: 10020
90+
- protocol: TCP
91+
name: port21
92+
port: 10021
93+
- protocol: TCP
94+
name: port22
95+
port: 10022
96+
- protocol: TCP
97+
name: port23
98+
port: 10023
99+
- protocol: TCP
100+
name: port24
101+
port: 10024
102+
- protocol: TCP
103+
name: port25
104+
port: 10025
105+
- protocol: TCP
106+
name: port26
107+
port: 10026
108+
- protocol: TCP
109+
name: port27
110+
port: 10027
111+
- protocol: TCP
112+
name: port28
113+
port: 10028
114+
- protocol: TCP
115+
name: port29
116+
port: 10029
117+
- protocol: TCP
118+
name: port30
119+
port: 10030
120+
- protocol: TCP
121+
name: port31
122+
port: 10031
123+
- protocol: TCP
124+
name: port32
125+
port: 10032
126+
- protocol: TCP
127+
name: port33
128+
port: 10033
129+
- protocol: TCP
130+
name: port34
131+
port: 10034
132+
- protocol: TCP
133+
name: port35
134+
port: 10035
135+
- protocol: TCP
136+
name: port36
137+
port: 10036
138+
---
139+
kind: Service
140+
apiVersion: v1
141+
metadata:
142+
name: switch2
143+
labels:
144+
app: nxosv
145+
role: switch2
146+
spec:
147+
selector:
148+
app: nxosv
149+
role: switch2
150+
type: ClusterIP
151+
ports:
152+
- protocol: TCP
153+
name: ssh
154+
port: 22
155+
- protocol: UDP
156+
name: snmp
157+
port: 161
158+
- protocol: TCP
159+
name: https
160+
port: 443
161+
- protocol: TCP
162+
name: netconf
163+
port: 830
164+
- protocol: TCP
165+
name: qemu
166+
port: 5000
167+
- protocol: TCP
168+
name: port01
169+
port: 10001
170+
- protocol: TCP
171+
name: port02
172+
port: 10002
173+
- protocol: TCP
174+
name: port03
175+
port: 10003
176+
- protocol: TCP
177+
name: port04
178+
port: 10004
179+
- protocol: TCP
180+
name: port05
181+
port: 10005
182+
- protocol: TCP
183+
name: port06
184+
port: 10006
185+
- protocol: TCP
186+
name: port07
187+
port: 10007
188+
- protocol: TCP
189+
name: port08
190+
port: 10008
191+
- protocol: TCP
192+
name: port09
193+
port: 10009
194+
- protocol: TCP
195+
name: port10
196+
port: 10010
197+
- protocol: TCP
198+
name: port11
199+
port: 10011
200+
- protocol: TCP
201+
name: port12
202+
port: 10012
203+
- protocol: TCP
204+
name: port13
205+
port: 10013
206+
- protocol: TCP
207+
name: port14
208+
port: 10014
209+
- protocol: TCP
210+
name: port15
211+
port: 10015
212+
- protocol: TCP
213+
name: port16
214+
port: 10016
215+
- protocol: TCP
216+
name: port17
217+
port: 10017
218+
- protocol: TCP
219+
name: port18
220+
port: 10018
221+
- protocol: TCP
222+
name: port19
223+
port: 10019
224+
- protocol: TCP
225+
name: port20
226+
port: 10020
227+
- protocol: TCP
228+
name: port21
229+
port: 10021
230+
- protocol: TCP
231+
name: port22
232+
port: 10022
233+
- protocol: TCP
234+
name: port23
235+
port: 10023
236+
- protocol: TCP
237+
name: port24
238+
port: 10024
239+
- protocol: TCP
240+
name: port25
241+
port: 10025
242+
- protocol: TCP
243+
name: port26
244+
port: 10026
245+
- protocol: TCP
246+
name: port27
247+
port: 10027
248+
- protocol: TCP
249+
name: port28
250+
port: 10028
251+
- protocol: TCP
252+
name: port29
253+
port: 10029
254+
- protocol: TCP
255+
name: port30
256+
port: 10030
257+
- protocol: TCP
258+
name: port31
259+
port: 10031
260+
- protocol: TCP
261+
name: port32
262+
port: 10032
263+
- protocol: TCP
264+
name: port33
265+
port: 10033
266+
- protocol: TCP
267+
name: port34
268+
port: 10034
269+
- protocol: TCP
270+
name: port35
271+
port: 10035
272+
- protocol: TCP
273+
name: port36
274+
port: 10036
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
apiVersion: apps/v1beta1
3+
kind: Deployment
4+
metadata:
5+
name: vr-xcon-probe1
6+
spec:
7+
replicas: 1
8+
template:
9+
metadata:
10+
labels:
11+
app: vr-xcon
12+
role: vr-xcon-probe1
13+
spec:
14+
containers:
15+
- name: vr-xcon-probe1
16+
image: <DOCKER-REGISTRY>/vr-xcon-probe:1.2
17+
args: ["--tap-listen", "1"]
18+
securityContext:
19+
privileged: true
20+
21+
---
22+
apiVersion: apps/v1beta1
23+
kind: Deployment
24+
metadata:
25+
name: vr-xcon-probe2
26+
spec:
27+
replicas: 1
28+
template:
29+
metadata:
30+
labels:
31+
app: vr-xcon
32+
role: vr-xcon-probe2
33+
spec:
34+
containers:
35+
- name: vr-xcon-probe2
36+
image: <DOCKER-REGISTRY>/vr-xcon-probe:1.2
37+
args: ["--tap-listen", "1"]
38+
securityContext:
39+
privileged: true

0 commit comments

Comments
 (0)