Skip to content

Commit

Permalink
Tweaks in docs (#181)
Browse files Browse the repository at this point in the history
* Tweaks in docs

* Warning DNS disable

* Update docs/src/howto/install/snap.md

Co-authored-by: Kevin W Monroe <[email protected]>

---------

Co-authored-by: Kevin W Monroe <[email protected]>
  • Loading branch information
ktsakalozos and kwmonroe authored Mar 1, 2024
1 parent 0a792ba commit 21fa476
Show file tree
Hide file tree
Showing 18 changed files with 335 additions and 189 deletions.
173 changes: 173 additions & 0 deletions docs/src/assets/arch.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
!constant c4 "c4.dsl"

workspace "Canonical K8s Workspace" {
model {

admin = person "K8s Admin" "Responsible for the K8s cluster, has elevated permissions"
user = person "K8s User" "Interact with the workloads hosted in K8s"
charm = softwareSystem "Charm K8s" "Orchestrating the lifecycle management of K8s"

external_lb = softwareSystem "Load Balancer" "External LB, offered by the substrate (cloud)" "Extern"
storage = softwareSystem "Storage" "External storage, offered by the substrate (cloud)" "Extern"
iam = softwareSystem "Identity management system" "External identity system, offered by the substrate (cloud)" "Extern"
external_datastore = softwareSystem "External datastore" "postgress or etcd" "Extern"

k8s_snap = softwareSystem "K8s Snap Distribution" "The Kubernetes distribution in a snap" {

kubectl = container "Kubectl" "kubectl client for accessing the cluster"

kubernetes = container "Kubernetes Services" "API server, kubelet, kube-proxy, scheduler, kube-controller" {
systemd = component "systemd daemons" "Daemons holding the k8s services"
apiserver = component "API server"
kubelet = component "kubelet"
kube_proxy = component "kube-proxy"
scheduler = component "scheduler"
kube_controller = component "kube-controller"
network = component "Network CNI" "The network implementation of K8s (from Cilium)"
storage_provider = component "Local storage provider" "Simple storage for workloads"
ingress = component "Ingress" "Ingress for workloads (from Cilium)"
gw = component "Gateway" "Gateway API for workloads (from Cilium)"
dns = component "DNS" "Internal DNS"
metrics_server = component "Metrics server" "Keep track of cluster metrics"
loadbalancer = component "Load-balancer" "The load balancer (from Cilium)"
}

rt = container "Runtime" "Containerd and runc"

k8sd = container "K8sd" "Deamon implementing the functionality available in the k8s snap" {
cli = component "CLI" "The CLI the offered" "CLI"
api = component "API via HTTP" "The API interface offered" "REST"
cluster_manager = component "CLuster management" "Management of the cluster with the help of MicroCluster"
}

state = container "State" "Datastores holding the cluster state" {
k8sd_db = component "k8sd-dqlite" "MicroCluster DB"
k8s_dqlite = component "k8s-dqlite" "Datastore holding the K8s cluster state"
}
}

admin -> cli "Administers the cluster"
admin -> kubectl "Uses to manage the cluster"
user -> loadbalancer "Interact with workloads hosted in K8s"
charm -> api "Orchestrates the lifecycle management of K8s"

k8s_snap -> storage "Hosted workloads use storage"
k8s_snap -> iam "Users identity is retrieved"

k8s_dqlite -> external_datastore "May be replaced by" "Any" "Runtime"
loadbalancer -> external_lb "May be replaced by" "Any" "Runtime"

cluster_manager -> systemd "Configures"

systemd -> apiserver "Is a service"
systemd -> kubelet "Is a service"
systemd -> kube_proxy "Is a service"
systemd -> kube_controller "Is a service"
systemd -> scheduler "Is a service"

network -> apiserver "Keeps state in"
dns -> apiserver "Keeps state in"
apiserver -> k8s_dqlite "Uses by default"

network -> ingress "May provide" "HTTP/HTTPS" "Runtime"
network -> gw "May provide" "HTTP/HTTPS" "Runtime"
network -> loadbalancer "May provide" "HTTP/HTTPS" "Runtime"

cluster_manager -> k8sd_db "Keeps state in"

kubectl -> apiserver "Interacts"
api -> systemd "Configures"
api -> rt "Configures"
api -> cluster_manager "Uses"

cli -> api "CLI is based on the API primitives"

}
views {

systemLandscape Overview "K8s Snap Overview" {
include *
autoLayout
}

container k8s_snap {
include *
autoLayout
title "K8s Snap Context View"
}

component state {
include *
autoLayout
title "Datastores"
}

component k8sd {
include *
autoLayout
title "k8sd"
}

component kubernetes {
include *
autoLayout
title "Kubernetes services"
}

styles {
element "Person" {
background #08427b
color #ffffff
fontSize 22
shape Person
}

element "Software System" {
background #1168bd
color #ffffff
}
element "Structurizr" {
background #77FF44
color #000000
}
element "Container" {
background #438dd5
color #ffffff
}
element "Component" {
background #85bbf0
color #000000
}
element "BuiltIn" {
background #1988f6
color #FFFFFF
}
element "Extern" {
background #dddddd
color #000000
}

element "Extension" {
background #FFdd88
color #000000
}

element "File" {
shape Folder
background #448704
color #ffffff
}

relationship "Relationship" {
dashed false
}

relationship "Runtime" {
dashed true
color #0000FF
}

}
}

}
21 changes: 9 additions & 12 deletions docs/src/assets/k8s-container.puml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@startuml
set separator none
title K8s Snap Container View
title K8s Snap Context View

top to bottom direction

Expand All @@ -9,33 +9,30 @@ top to bottom direction
!include <C4/C4_Container>

Person(K8sAdmin, "K8s Admin", $descr="Responsible for the K8s cluster, has elevated permissions", $tags="", $link="")
Person(K8sUser, "K8s User", $descr="Interacts with the workloads hosted in K8s", $tags="", $link="")
System(K8scharm, "K8s charm", $descr="Orchestrating the lifecycle management of K8s", $tags="", $link="")
Person(K8sUser, "K8s User", $descr="Interact with the workloads hosted in K8s", $tags="", $link="")
System(CharmK8s, "Charm K8s", $descr="Orchestrating the lifecycle management of K8s", $tags="", $link="")
System(LoadBalancer, "Load Balancer", $descr="External LB, offered by the substrate (cloud)", $tags="", $link="")
System(Externaldatastore, "External datastore", $descr="postgress or etcd", $tags="", $link="")

System_Boundary("K8sSnapDistribution_boundary", "K8s Snap Distribution", $tags="") {
Container(K8sSnapDistribution.KubernetesServices, "Kubernetes Services", $techn="", $descr="API server, kubelet, kube-proxy, scheduler, kube-controller", $tags="", $link="")
Container(K8sSnapDistribution.Runtime, "Runtime", $techn="", $descr="Containerd and runc", $tags="", $link="")
Container(K8sSnapDistribution.Components, "Components", $techn="", $descr="Core components for the k8s distribution", $tags="", $link="")
Container(K8sSnapDistribution.K8sd, "K8sd", $techn="", $descr="Daemon implementing the functionality available in the k8s snap", $tags="", $link="")
Container(K8sSnapDistribution.K8sd, "K8sd", $techn="", $descr="Deamon implementing the functionality available in the k8s snap", $tags="", $link="")
Container(K8sSnapDistribution.State, "State", $techn="", $descr="Datastores holding the cluster state", $tags="", $link="")
Container(K8sSnapDistribution.Kubectl, "Kubectl", $techn="", $descr="kubectl client for accessing the cluster", $tags="", $link="")
}

Rel(K8sAdmin, K8sSnapDistribution.K8sd, "Creates and administers the cluster", $techn="", $tags="", $link="")
Rel(K8sAdmin, K8sSnapDistribution.K8sd, "Sets up and configured the cluster", $techn="", $tags="", $link="")
Rel(K8sAdmin, K8sSnapDistribution.Kubectl, "Uses to manage the cluster", $techn="", $tags="", $link="")
Rel(K8sUser, K8sSnapDistribution.Components, "Interacts with workloads hosted in K8s", $techn="", $tags="", $link="")
Rel(K8scharm, K8sSnapDistribution.K8sd, "Orchestrates the lifecycle management of K8s", $techn="", $tags="", $link="")
Rel(K8sUser, K8sSnapDistribution.KubernetesServices, "Interacts with workloads hosted in K8s", $techn="", $tags="", $link="")
Rel(CharmK8s, K8sSnapDistribution.K8sd, "Orchestrates the lifecycle management of K8s", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.State, Externaldatastore, "May be replaced by", $techn="Any", $tags="", $link="")
Rel(K8sSnapDistribution.Components, LoadBalancer, "May be replaced by", $techn="Any", $tags="", $link="")
Rel(K8sSnapDistribution.K8sd, K8sSnapDistribution.Components, "Handles", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices, LoadBalancer, "May be replaced by", $techn="Any", $tags="", $link="")
Rel(K8sSnapDistribution.K8sd, K8sSnapDistribution.KubernetesServices, "Configures", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.Components, K8sSnapDistribution.KubernetesServices, "Keeps state in", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices, K8sSnapDistribution.State, "Uses by default", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.K8sd, K8sSnapDistribution.State, "Keeps state in", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.Kubectl, K8sSnapDistribution.KubernetesServices, "Interacts", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.K8sd, K8sSnapDistribution.Runtime, "Configures", $techn="", $tags="", $link="")

SHOW_LEGEND(true)
@enduml
@enduml
27 changes: 20 additions & 7 deletions docs/src/assets/k8s-services.puml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,44 @@ top to bottom direction
!include <C4/C4_Container>
!include <C4/C4_Component>

Container(K8sSnapDistribution.K8sd, "K8sd", $techn="", $descr="Daemon implementing the functionality available in the k8s snap", $tags="", $link="")
Container(K8sSnapDistribution.Components, "Components", $techn="", $descr="Core components for the k8s distribution", $tags="", $link="")
Container(K8sSnapDistribution.Kubectl, "Kubectl", $techn="", $descr="kubectl client for accessing the cluster", $tags="", $link="")
Container(K8sSnapDistribution.K8sd, "K8sd", $techn="", $descr="Deamon implementing the functionality available in the k8s snap", $tags="", $link="")
Container(K8sSnapDistribution.State, "State", $techn="", $descr="Datastores holding the cluster state", $tags="", $link="")
Person(K8sUser, "K8s User", $descr="Interact with the workloads hosted in K8s", $tags="", $link="")
System(LoadBalancer, "Load Balancer", $descr="External LB, offered by the substrate (cloud)", $tags="", $link="")
Container(K8sSnapDistribution.Kubectl, "Kubectl", $techn="", $descr="kubectl client for accessing the cluster", $tags="", $link="")

Container_Boundary("K8sSnapDistribution.KubernetesServices_boundary", "Kubernetes Services", $tags="") {
Component(K8sSnapDistribution.KubernetesServices.systemddaemons, "systemd daemons", $techn="", $descr="Daemons running the k8s services", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.systemddaemons, "systemd daemons", $techn="", $descr="Daemons holding the k8s services", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.APIserver, "API server", $techn="", $descr="", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.kubelet, "kubelet", $techn="", $descr="", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.kubeproxy, "kube-proxy", $techn="", $descr="", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.scheduler, "scheduler", $techn="", $descr="", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.kubecontroller, "kube-controller", $techn="", $descr="", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.NetworkCNI, "Network CNI", $techn="", $descr="The network implementation of K8s (from Cilium)", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.Localstorageprovider, "Local storage provider", $techn="", $descr="Simple storage for workloads", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.Ingress, "Ingress", $techn="", $descr="Ingress for workloads (from Cilium)", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.Gateway, "Gateway", $techn="", $descr="Gateway API for workloads (from Cilium)", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.DNS, "DNS", $techn="", $descr="Internal DNS", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.Metricsserver, "Metrics server", $techn="", $descr="Keep track of cluster metrics", $tags="", $link="")
Component(K8sSnapDistribution.KubernetesServices.Loadbalancer, "Load-balancer", $techn="", $descr="The load balancer (from Cilium)", $tags="", $link="")
}

Rel(K8sSnapDistribution.K8sd, K8sSnapDistribution.Components, "Handles", $techn="", $tags="", $link="")
Rel(K8sUser, K8sSnapDistribution.KubernetesServices.Loadbalancer, "Interacts with workloads hosted in K8s", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.Loadbalancer, LoadBalancer, "May be replaced by", $techn="Any", $tags="", $link="")
Rel(K8sSnapDistribution.K8sd, K8sSnapDistribution.KubernetesServices.systemddaemons, "Configures", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.systemddaemons, K8sSnapDistribution.KubernetesServices.APIserver, "Is a service", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.systemddaemons, K8sSnapDistribution.KubernetesServices.kubelet, "Is a service", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.systemddaemons, K8sSnapDistribution.KubernetesServices.kubeproxy, "Is a service", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.systemddaemons, K8sSnapDistribution.KubernetesServices.kubecontroller, "Is a service", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.systemddaemons, K8sSnapDistribution.KubernetesServices.scheduler, "Is a service", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.Components, K8sSnapDistribution.KubernetesServices.APIserver, "Keeps state in", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.NetworkCNI, K8sSnapDistribution.KubernetesServices.APIserver, "Keeps state in", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.DNS, K8sSnapDistribution.KubernetesServices.APIserver, "Keeps state in", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.APIserver, K8sSnapDistribution.State, "Uses by default", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.NetworkCNI, K8sSnapDistribution.KubernetesServices.Ingress, "May provide", $techn="HTTP/HTTPS", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.NetworkCNI, K8sSnapDistribution.KubernetesServices.Gateway, "May provide", $techn="HTTP/HTTPS", $tags="", $link="")
Rel(K8sSnapDistribution.KubernetesServices.NetworkCNI, K8sSnapDistribution.KubernetesServices.Loadbalancer, "May provide", $techn="HTTP/HTTPS", $tags="", $link="")
Rel(K8sSnapDistribution.K8sd, K8sSnapDistribution.State, "Keeps state in", $techn="", $tags="", $link="")
Rel(K8sSnapDistribution.Kubectl, K8sSnapDistribution.KubernetesServices.APIserver, "Interacts", $techn="", $tags="", $link="")

SHOW_LEGEND(true)
@enduml
@enduml
Loading

0 comments on commit 21fa476

Please sign in to comment.