-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathkubernetes_on_premise_metallb.d2
executable file
·109 lines (96 loc) · 2.51 KB
/
kubernetes_on_premise_metallb.d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/env d2 --theme 200
#
# Author: Hari Sekhon
# Date: 2023-05-06 00:27:56 +0100 (Sat, 06 May 2023)
#
# vim:ts=2:sts=2:sw=2:et:filetype=d2
#
# https://github.com/HariSekhon/Diagrams-as-Code
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# K u b e r n e t e s O n - p r e m i s e M e t a l L B
# ============================================================================ #
direction: right
title: {
label: Kubernetes On-Premise with MetalLB
near: top-center
shape: text
style.font-size: 40
style.underline: true
}
classes: {
network: {
icon: https://diagrams.mingrammer.com/img/resources/gcp/network/routes.png
shape: image
}
storage: {
label: "HA Networked Storage\nfor Kubernetes\nPersistent Volumes"
icon: https://icons.terrastruct.com/azure%2FStorage%20Service%20Color%2FGeneral%20Storage.svg
shape: image
}
lb: {
label: MetalLB
# icon: https://devopstales.github.io/img/metallb2.png
icon: https://metallb.universe.tf/images/logo/metallb-white.png
shape: image
}
k8s: {
icon: https://icons.terrastruct.com/azure%2F_Companies%2FKubernetes.svg
shape: image
}
k8s_ingress: {
icon: https://diagrams.mingrammer.com/img/resources/k8s/network/ing.png
shape: image
}
server: {
icon: https://icons.terrastruct.com/essentials%2F112-server.svg
}
}
users: Users {
icon: https://icons.terrastruct.com/essentials%2F359-users.svg
shape: image
}
users -> user_network
user_network: Network {class: network}
user_network -> Server 1.lb1
user_network -> Server 2.lb2: {
label: VIP\nLayer 2 Failover
style.opacity: 0.5
style.stroke-dash: 5
}
Server 1: {
class: server
lb1.class: lb
lb1 -> kube1
lb1 -> _.Server 2.kube2
lb1 -> _.Server 3.kube3
kube1: Kubernetes 1 {class: k8s}
}
Server 2: {
class: server
lb2.class: lb
lb2 -> kube2
lb2 -> _.Server 1.kube1
lb2 -> _.Server 3.kube3
kube2: Kubernetes 2 {class: k8s}
}
Server 3: {
class: server
lb3.class: lb
lb3 -> kube3
lb3 -> _.Server 1.kube1
lb3 -> _.Server 2.kube2
kube3: Kubernetes 3 {class: k8s}
}
Server 1 -> storage_network
Server 2 -> storage_network
Server 3 -> storage_network
storage_network: Network {class: network}
storage_network -> storage
storage: {class: storage}