22title : User-defined networks
33linktitle : User-defined networks
44description : User-defined networks (UDN)
5- tags : ['UDN','v4.18 ']
5+ tags : ['UDN','v4.19 ']
66---
77# User-defined networks (UDN)
88
@@ -22,8 +22,8 @@ Tested with:
2222
2323| Component| Version|
2424| ---| ---|
25- | OpenShift| v4.18.8 |
26- | OpenShift Virt| v4.18.2 |
25+ | OpenShift| v4.19.1 |
26+ | OpenShift Virt| v4.19.0 |
2727
2828![ ] ( overview.drawio )
2929
@@ -36,56 +36,95 @@ Tested with:
3636| tanent-3| namespace-3| blue| CUDN (cudn-3)| ` 203.0.113.0/24 ` |
3737| tanent-4| namespace-4| orange| CUDN (cudn-3)| ` 203.0.113.0/24 ` |
3838
39- ## Deploy
4039
41- ``` shell
42- oc apply -k overlays/tentant-1
43- oc apply -k overlays/tentant-2
44- oc apply -k overlays/tentant-3
45- ```
46-
47- ``` shell
48- $ oc get namespaces -l tentant -L tentant
49- NAME STATUS AGE TENTANT
50- namespace-1 Active 4m1s tentant-1
51- namespace-2 Active 3m51s tentant-2
52- namespace-3 Active 3m14s tentant-3
53- namespace-4 Active 3m13s tentant-3
54-
55- $ oc get pods -o go-template-file=podlist-with-p-udn.gotemplate -A -l tentant | jq ' (.[] | [.node,.namespace, .udn[1].ips[0], .udn[0].ips[0], .name]) | @tsv' -r
56- ocp1-worker-0 namespace-1 192.0.2.10 10.131.0.201 agnhost-7f79bb7dc-t8rfg
57- ocp1-worker-0 namespace-1 192.0.2.9 10.131.0.202 rhel-support-tools-7c89889f94-wq2gj
58- ocp1-worker-1 namespace-1 192.0.2.17 10.128.3.55 simple-http-server-bb9ccffd4-74j47
59- ocp1-worker-2 namespace-1 192.0.2.11 10.129.2.131 simple-http-server-bb9ccffd4-jq4bb
60- ocp1-worker-0 namespace-1 192.0.2.16 10.131.0.223 simple-http-server-bb9ccffd4-xll6x
61- ocp1-worker-2 namespace-1 192.0.2.19 10.129.2.143 virt-launcher-simple-httpd-vm-5wxpj
62- ocp1-worker-0 namespace-2 10.255.2.6 10.131.0.220 agnhost-59964fb864-hp46z
63- ocp1-worker-0 namespace-2 10.255.2.8 10.131.0.221 rhel-support-tools-7cfb68d78f-89jkl
64- ocp1-worker-0 namespace-2 10.255.2.7 10.131.0.222 simple-http-server-7c567b8c4c-2pph6
65- ocp1-worker-1 namespace-2 10.255.3.4 10.128.3.54 simple-http-server-7c567b8c4c-brqtl
66- ocp1-worker-2 namespace-2 10.255.0.4 10.129.2.137 simple-http-server-7c567b8c4c-mjgwc
67- ocp1-worker-1 namespace-2 10.255.3.8 10.128.3.62 virt-launcher-simple-httpd-vm-w6hwn
68- ocp1-worker-2 namespace-3 203.0.113.22 10.129.2.135 agnhost-f4b987769-kcmvs
69- ocp1-worker-0 namespace-3 203.0.113.25 10.131.0.207 rhel-support-tools-5b999555b4-w2qv5
70- ocp1-worker-2 namespace-3 203.0.113.23 10.129.2.134 simple-http-server-6b84977478-7kkhd
71- ocp1-worker-1 namespace-3 203.0.113.29 10.128.3.56 simple-http-server-6b84977478-pbj4d
72- ocp1-worker-0 namespace-3 203.0.113.30 10.131.0.224 simple-http-server-6b84977478-wn6kl
73- ocp1-worker-0 namespace-3 203.0.113.39 10.131.1.39 virt-launcher-simple-httpd-vm-h8xr7
74- ocp1-worker-0 namespace-4 203.0.113.26 10.131.0.203 agnhost-f4b987769-vxtl7
75- ocp1-worker-0 namespace-4 203.0.113.24 10.131.0.204 rhel-support-tools-5b999555b4-5kgbs
76- ocp1-worker-0 namespace-4 203.0.113.33 10.131.0.225 simple-http-server-6b84977478-mqhj4
77- ocp1-worker-2 namespace-4 203.0.113.21 10.129.2.133 simple-http-server-6b84977478-rnc2c
78- ocp1-worker-1 namespace-4 203.0.113.35 10.128.3.57 simple-http-server-6b84977478-v7xhz
79- ocp1-worker-2 namespace-4 203.0.113.40 10.129.2.142 virt-launcher-simple-httpd-vm-lk4rc
80- $ oc get vmi -l tentant -A
81- NAMESPACE NAME AGE PHASE IP NODENAME READY
82- namespace-1 simple-httpd-vm 93s Running 192.0.2.19 ocp1-worker-2 True
83- namespace-2 simple-httpd-vm 87s Running 10.255.3.8 ocp1-worker-1 True
84- namespace-3 simple-httpd-vm 2m43s Running 203.0.113.39 ocp1-worker-0 True
85- namespace-4 simple-httpd-vm 2m42s Running 203.0.113.40 ocp1-worker-2 True
86- ```
40+ ## Deploy
8741
88- * Why is ip's of UDN nocht in pod status ` podIPs ` ?
42+ === ":material-keyboard: Command"
43+
44+ ``` shell
45+ oc apply -k {{ config.repo_url }}/content/{{ page.url }}manifests/overlays/tentant-1
46+ oc apply -k {{ config.repo_url }}/content/{{ page.url }}manifests/overlays/tentant-2
47+ oc apply -k {{ config.repo_url }}/content/{{ page.url }}manifests/overlays/tentant-3
48+ ```
49+
50+ ## Gather information
51+
52+ ### Namespace
53+
54+ === ":material-keyboard: Command"
55+
56+ ```shell
57+ oc get namespaces -l tentant -L tentant
58+ ```
59+
60+ === ":material-monitor: Output"
61+
62+ ```shell
63+ $ oc get namespaces -l tentant -L tentant
64+ NAME STATUS AGE TENTANT
65+ namespace-1 Active 4m1s tentant-1
66+ namespace-2 Active 3m51s tentant-2
67+ namespace-3 Active 3m14s tentant-3
68+ namespace-4 Active 3m13s tentant-3
69+ ```
70+
71+ ### Pods
72+
73+ === ":material-keyboard: Command"
74+
75+ ```shell
76+ oc get pods -o go-template-file=podlist-with-p-udn.gotemplate -A -l tentant | jq ' (.[] | [.node,.namespace, .udn[1].ips[0], .udn[0].ips[0], .name])| @tsv' -r
77+ ```
78+
79+ === ":material-monitor: Output"
80+
81+ ```shell
82+ $ oc get pods -o go-template-file=podlist-with-p-udn.gotemplate -A -l tentant | jq ' (.[] | [.node,.namespace, .udn[1].ips[0], .udn[0].ips[0], .name])| @tsv' -r
83+
84+ ocp1-worker-2 namespace-1 192.0.2.21 10.129.2.17 agnhost-9d56666c9-f8mjj
85+ ocp1-worker-2 namespace-1 192.0.2.22 10.129.2.16 rhel-support-tools-86bf5b4d7d-6p96k
86+ ocp1-worker-1 namespace-1 192.0.2.15 10.128.2.56 simple-http-server-794b76798d-74hn9
87+ ocp1-worker-0 namespace-1 192.0.2.25 10.131.0.67 simple-http-server-794b76798d-h7lsm
88+ ocp1-worker-2 namespace-1 192.0.2.14 10.129.2.11 simple-http-server-794b76798d-nl2qh
89+ ocp1-worker-2 namespace-1 192.0.2.13 10.129.2.27 virt-launcher-simple-httpd-vm-q7mh4
90+ ocp1-worker-2 namespace-2 10.255.3.9 10.129.2.21 agnhost-957d4f456-gc2wf
91+ ocp1-worker-2 namespace-2 10.255.3.6 10.129.2.20 rhel-support-tools-9cb87db57-tqr2q
92+ ocp1-worker-0 namespace-2 10.255.5.5 10.131.0.68 simple-http-server-645945f9-2rp6t
93+ ocp1-worker-1 namespace-2 10.255.2.4 10.128.2.57 simple-http-server-645945f9-2v5jb
94+ ocp1-worker-2 namespace-2 10.255.3.4 10.129.2.13 simple-http-server-645945f9-622d6
95+ ocp1-worker-2 namespace-2 10.255.3.13 10.129.2.26 virt-launcher-simple-httpd-vm-222c2
96+ ocp1-worker-2 namespace-3 203.0.113.50 10.129.2.15 agnhost-6d845f6977-nhfzc
97+ ocp1-worker-2 namespace-3 203.0.113.59 10.129.2.22 rhel-support-tools-5455498cbd-6j9gv
98+ ocp1-worker-2 namespace-3 203.0.113.42 10.129.2.12 simple-http-server-657fb44bfd-8nx28
99+ ocp1-worker-0 namespace-3 203.0.113.51 10.131.0.66 simple-http-server-657fb44bfd-c878t
100+ ocp1-worker-1 namespace-3 203.0.113.44 10.128.2.58 simple-http-server-657fb44bfd-l9zdx
101+ ocp1-worker-2 namespace-3 203.0.113.23 10.129.2.24 virt-launcher-simple-httpd-vm-x4t6n
102+ ocp1-worker-2 namespace-4 203.0.113.55 10.129.2.18 agnhost-6d845f6977-c9449
103+ ocp1-worker-2 namespace-4 203.0.113.56 10.129.2.19 rhel-support-tools-5455498cbd-bd725
104+ ocp1-worker-1 namespace-4 203.0.113.60 10.128.2.59 simple-http-server-657fb44bfd-5qv9v
105+ ocp1-worker-0 namespace-4 203.0.113.41 10.131.0.65 simple-http-server-657fb44bfd-6hg4c
106+ ocp1-worker-2 namespace-4 203.0.113.43 10.129.2.14 simple-http-server-657fb44bfd-djgql
107+ ocp1-worker-2 namespace-4 203.0.113.24 10.129.2.23 virt-launcher-simple-httpd-vm-99p7x
108+ ```
109+
110+ ### VirtualMachineInstances (VMI)
111+
112+ === ":material-keyboard: Command"
113+
114+ ```shell
115+ oc get vmi -l tentant -A
116+ ```
117+
118+ === ":material-monitor: Output"
119+
120+ ```shell
121+ $ oc get vmi -l tentant -A
122+ NAMESPACE NAME AGE PHASE IP NODENAME READY
123+ namespace-1 simple-httpd-vm 5m30s Running 192.0.2.13 ocp1-worker-2 True
124+ namespace-2 simple-httpd-vm 5m32s Running 10.255.3.13 ocp1-worker-2 True
125+ namespace-3 simple-httpd-vm 5m37s Running 203.0.113.23 ocp1-worker-2 True
126+ namespace-4 simple-httpd-vm 5m39s Running 203.0.113.24 ocp1-worker-2 True
127+ ```
89128
90129## Testing
91130
@@ -171,8 +210,8 @@ r.local
171210curl : (7) Failed to connect to simple-httpd-vm.namespace-3.svc.cluster.local port 80: Connection refused
172211` ` `
173212
174- * ❌ Pod -> Service -> VM with L2Bridge in UDN
175- * ✅ Pod -> Service -> Pod
213+ * ❌ Pod :arrow_right: Service :arrow_right: VM with L2Bridge in UDN
214+ * ✅ Pod :arrow_right: Service :arrow_right: Pod
176215
177216### ✅ Ingress
178217
@@ -230,3 +269,9 @@ simple-httpd-vm 67m Running 203.0.113.41 ocp1-worker-2 True
230269* Tentant 2 is Layer 3
231270
232271### ⏱️ Localnet (Available with 4.19)
272+
273+ TBD
274+
275+ ## ❓ Open question
276+
277+ * Why UDN ip is not represented in pod status ips?
0 commit comments