A library of PlantUML sprites for Kubernetes, derived from the Kubernetes Community icons set.
This library provides two usages; as a “normal” spite tile on a rectangle object, and as a header on a “container” object (also implemented as a rectangle).
K8S(alias, kind, label, color) K8S_BOUNDARY(alias, kind, label, color)
In both cases “color” defaults to #326ce5 (Kubernetes blue) and is optional.
Include the sprite definitions and common.puml following the example below. This library follows the structure of the community icon library.Each directory has one all.puml file that includes all that directory’s sprites. common.puml defines the macros that use them.
Note: Due to limitations of PlantUML, all sprites use underscores in place of dashes. For example, the sprite for “k-proxy” is named “k_proxy”.
@startuml
!define k8s https://raw.githubusercontent.com/Cerebus/k8s-plantuml/master/k8s
!include k8s/common.puml
!include k8s/infrastructure_components/unlabeled/all.puml
!include k8s/control_plane_components/labeled/all.puml
K8S(node1, node, Node 1)
K8S(node2, node, Node 2)
K8S_BOUNDARY(control, control_plane, Control Plane) {
K8S(api, api, kube-apiserver)
K8S(cm, c_m, kube-controller-manager)
K8S(proxy, k_proxy, kube-proxy)
K8S(sched, sched, kube-scheduler)
}
K8S(etcd, etcd, Etcd)
@endumlrsvg-convert- Converts SVG to PNGplantuml.jar- Obviously- GNU
make
kpt embeds the upstream SVG files in this repository, under src/. Update these files with the following command.
kpt pkg update src/@master --strategy force-delete-replaceSet the environment variable PLANTUML to your PlantUML installation and run make.
PLANTUML=/usr/local/etc/plantuml.jar makeBy default, sprites build in the k8s/ directory but can be overridden with the DEST environment variable.
See LICENSE.
- T. Miller - Cerebus
- The Kubernetes Community - for the icons
- The PlantUML Guys