Skip to content

Instantly share code, notes, and snippets.

@terlar
Last active June 12, 2024 19:54
Show Gist options
  • Save terlar/2570136bbba65d6a1ffa7525564b4c83 to your computer and use it in GitHub Desktop.
Save terlar/2570136bbba65d6a1ffa7525564b4c83 to your computer and use it in GitHub Desktop.
Diagrams, example
internet: "Public Internet"
google: "Google Cloud" {
ext-lb: "HTTP(S) Load Balancer"
cloud-armor: "Cloud Armor"
ext-vpc: "shared-external-vpc" {
waf: WAF
}
cluster-vpc: "shared-k8s-vpc" {
gateway: {
int-alb: "Regional internal Application Load Balancer" {
backend: Backend {
style.multiple: true
}
}
}
gke: GKE {
config-cluster: "Config Cluster" {
customer-namespace: "Customer Namespace" {
http-route: HTTPRoute
}
infra-namespace: "Infra Namespace" {
gateway: "Gateway"
}
}
cluster-x: "Cluster" {
style.multiple: true
customer-namespace: "Customer Namespace" {
pod: Pod {
style.multiple: true
}
}
}
}
}
}
# Connections
internet -> google.ext-lb
google: {
ext-lb -- cloud-armor
ext-lb -> ext-vpc.waf
ext-vpc.waf -> cluster-vpc.gateway.int-alb
cluster-vpc: {
gateway.int-alb.backend -> gke.cluster-x.customer-namespace.pod
(gateway <- gke.config-cluster.infra-namespace.gateway).class: owns
(gateway.int-alb.backend <- gke.config-cluster.customer-namespace.http-route).class: owns
}
}
# Appearance
style.fill: transparent
internet.shape: cloud
classes: {
owns: class {
label: owns
source-arrowhead.shape: diamond
style.stroke-dash: 5
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@startuml
skinparam linetype ortho
skinparam arrowThickness 2
cloud Internet as "Public Internet"
rectangle GoogleCloud as "Google Cloud" {
component ExtLB as "HTTP(S) Load Balancer"
component CloudArmor as "Cloud Armor"
rectangle ExtVPC as "shared-external-vpc" {
component WAF as "WAF"
}
rectangle ClusterVPC as "shared-k8s-vpc" {
component "gateway" {
label " " as Gateway
component "Regional internal Application Load Balancer" {
label " " as IntALB
collections Backend as "Backend"
}
}
together {
component Cluster1 as "cluster 1" {
package Cluster1CustomerNamespace as "Customer Namespace" {
collections Cluster1Pods as "Pod"
}
}
component Cluster2 as "cluster 2" {
package Cluster2CustomerNamespace as "Customer Namespace" {
collections Cluster2Pods as "Pod"
}
}
component ConfigCluster as "config cluster" {
package ConfigClusterCustomerNamespace as "Customer Namespace" {
collections HTTPRoute
}
package InfraNamespace as "Infra Namespace" {
rectangle GatewayResource as "Gateway"
}
}
}
}
}
Internet --> ExtLB
ExtLB - CloudArmor
ExtLB --> WAF
WAF --> IntALB
Backend --> Cluster1Pods
Backend --> Cluster2Pods
GatewayResource .> Gateway: owns
HTTPRoute .> Backend: owns
@enduml
@terlar
Copy link
Author

terlar commented Jun 12, 2024

D2:
d2

PlantUML:
plantuml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment