Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
174 lines (137 sloc) 7.94 KB
digraph {
node[shape=rect, color=cornflowerblue, style="bold"];
graph[pad="0", nodesep="0.2", ranksep="0"];
edge[color="darkgreen"];
/********** NODES **********/
// Outer objects
subgraph cluster_no_resources {
label="Not K8S resources";
color="grey";
container[label="Container", URL="https://www.docker.com/resources/what-container"];
image[label="Image", URL="https://kubernetes.io/docs/concepts/containers/images/"];
}
// Base
subgraph cluster_workload {
label="Workload";
color="grey";
pod[label="Pod", URL="https://kubernetes.io/docs/concepts/workloads/pods/pod/"];
}
// Controllers
subgraph cluster_controllers {
label="Controllers";
color="grey";
deployment[label="Deployment", URL="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/"];
replicaset[label="ReplicaSet", URL="https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/"];
// replication_controller[label="ReplicationController", URL="https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/"];
statefulset[label="StatefulSet", URL="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/"];
daemonset[label="DaemonSet", URL="https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/"];
{rank=same;
replicaset;
statefulset;
daemonset
};
}
// Jobs
subgraph cluster_jobs {
label="Jobs";
color="grey";
job[label="Job", URL="https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/"];
cronjob[label="CronJob", URL="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/"];
}
// Services, load balancing & networking
subgraph cluster_services {
label="Services, load balancing & networking";
color="grey";
// endpoint_slice[label="EndpointSlice", style="dashed", URL="https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/"];
service[label="Service", URL="https://kubernetes.io/docs/concepts/services-networking/service/"];
ingress[label="Ingress", URL="https://kubernetes.io/docs/concepts/services-networking/ingress/"];
ingress_controller[label="Ingress Controller", URL="https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/"];
// network_policy[label="Network Policy", URL="https://kubernetes.io/docs/concepts/services-networking/network-policies/"];
}
// Storage
subgraph cluster_storage {
label="Storage";
color="grey";
volume[label="Volume", URL="https://kubernetes.io/docs/concepts/storage/volumes/"];
persistent_volume[label="Persistent Volume", URL="https://kubernetes.io/docs/concepts/storage/persistent-volumes/"];
persistent_volume_claim[label="PersistentVolumeClaim", URL="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims"];
volume_snapshot[label="Volume Snapshot", URL="https://kubernetes.io/docs/concepts/storage/volume-snapshots/"];
volume_snapshot_content[label="Volume Snapshot Content", URL="https://kubernetes.io/docs/concepts/storage/volume-snapshots/"];
storage_class[label="Storage Class", URL="https://kubernetes.io/docs/concepts/storage/storage-classes/"];
volume_snapshot_class[label="Volume Snapshot Class", URL="https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes/"];
configmap[label="ConfigMap", URL="https://kubernetes.io/docs/concepts/storage/volumes/#configmap"];
{rank=same;
persistent_volume;
persistent_volume_claim;
volume_snapshot_content;
}
}
// Configuration
subgraph cluster_configuration {
label="Configuration";
color="grey";
secret[label="Secret", URL="https://kubernetes.io/docs/concepts/configuration/secret/"];
}
// Permissions
subgraph cluster_permissions {
label="Permissions";
color="grey";
rankdir=LR;
// Namespace specific
subgraph cluster_namespace_permissions {
label="Namespace-specific";
rolebinding[label="Role Binding", URL="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding"];
role[label="Role", URL="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole"];
service_account[label="Service Account", URL="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"];
{rank=same;
rolebinding;
role;}
}
// Cluster-wide
subgraph cluster_global_permissions {
label="Global";
cluster_rolebinding[label="Cluster Role Binding", URL="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding"];
cluster_role[label="Cluster Role", URL="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole"];
cluster_service_account[label="Cluster Service Account", URL="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"];
{rank=same;
cluster_rolebinding;
cluster_role;}
}
}
/********** LINKS **********/
// Controllers
container -> image[label="Initialized with"];
pod -> container[color=brown, label="Hosts several, sharing filesystem & network"];
deployment -> replicaset[label="Deploys version as"];
replicaset -> pod[color=darkslateblue, label="Handles restart & replication of"];
statefulset -> pod[color=darkslateblue, label="Deploys with \"sticky\" identity"];
daemonset -> pod[color=darkslateblue, label="Deploys one per node"];
// replication_controller -> deployment[label="Recommended to replace with", style="dotted"];
// Jobs
cronjob -> job[label="Launches on a schedule"];
job -> pod[color=darkslateblue, label="Is run as a"];
// Services, load balancing & networking
ingress_controller -> pod[color=darkslateblue, label="Run in a"];
ingress_controller -> ingress[label="Routes based on"];
ingress -> service[label="Routes external requests to"];
service -> pod[color=darkslateblue, label="Routes (based on labels) to"];
// Storage
pod -> volume[color=brown, label="Stores data on"];
pod -> secret[color=brown, label="Initializes sensitive variables from"];
pod -> secret[color=brown, label="Stores sensitive data on"];
pod -> configmap[color=brown, label="Keeps configuration data on"];
volume -> persistent_volume[label="Implemented as"];
volume -> persistent_volume_claim[label="Implemented as"];
persistent_volume_claim -> persistent_volume[label="A request for a"];
persistent_volume -> storage_class[label="Provisioned with"];
volume_snapshot -> volume_snapshot_content[label="Request the generation of a"];
volume_snapshot_content -> volume_snapshot_class[label="Provisioned with"];
volume_snapshot_content -> volume[style=dashed, label="Backups content of"];
// Permissions
rolebinding -> role[label="Grants permissions in ..."];
rolebinding -> service_account[label="... to a"];
cluster_rolebinding -> cluster_role[label="Grants permissions in ..."];
cluster_rolebinding -> cluster_service_account[label="... to a"];
service_account -> pod[color=darkslateblue, label="Provides identity to process running in a"];
cluster_service_account -> pod[color=darkslateblue, label="Provides identity to process running in a"];
}
You can’t perform that action at this time.