Kubernetes Icons Set & Kubernetes ressources map

# はじめに
Kubernetesを理解したり、kubernetesに関するスライドを作る際に[Kubernetes Icons Set][0]がとても役に立つのでもっとみんなの目に触れるといいなと思ってQiitaにまとめてみました。
各Componentの英語の概要は書いてありますが、もう少し詳しい内容が知りたい場合は[kubernetesの公式サイト][1]を確認するか、日本語で詳しい内容を知りたい場合は[Kubernetes完全ガイド][2]を読むと大体のことはわかると思います。



[0]:https://github.com/kubernetes/community/tree/master/icons
[1]:https://kubernetes.io/
[2]:https://book.impress.co.jp/books/1118101055

# icons

## Compute

| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
|pod|![pod-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/920ed8bc-38b5-e168-3103-ef9a06ad4faf.png)|![pod-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/9bc76af6-50d8-f99c-3c24-dbed0387f209.png)|
| ReplicaSet | ![rs-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/26fa4109-f72a-782b-4181-2779c7a4b33a.png) | ![rs-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/ef7d8cc3-c450-c1f6-14e5-3d2175c9de6a.png)|
| Deployment | ![deploy-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/2e9375fe-f26e-328d-b039-ad33be2cf24e.png) | ![deploy-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/4f67b087-1bae-ab91-27be-7e6c1e62fb59.png) |
| DaemonSet | ![ds-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/2e54d56c-e995-be11-f037-1530c1a8f915.png) | ![ds-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/b267566b-1fc4-feff-ba99-a77e93f4ec7a.png) |
| Job | ![job-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/f865325e-bd05-2bf7-9fa1-9977eca6cc44.png) | ![job-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/44475dd4-d381-0784-446e-ea4a09020afa.png)|
| CronJob | ![cronjob-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/de97ab76-2672-e9c2-454f-0842dd1697fe.png) | ![cronjob-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/49c19615-7a83-58bd-3718-1630fdf99cfb.png) |
| StatefulSet | ![sts-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/51f8dac6-e7dd-2463-8284-acc6459be909.png) | ![sts-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/e006cdf9-c96c-a811-c173-4b761d8e78fe.png) |

- **Pod**: Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.
- **ReplicaSet**: ReplicaSet ensures that a specified number of pod replicas are running at any given time
- **Deployment**: Deployment enables declarative updates for Pods and ReplicaSets.
- **DaemonSet**: DaemonSet represents the configuration of a daemon set.
- **Job**: Job represents the configuration of a single job.
- **CronJob**:  A CronJob manages time based Job, namely:
    - once at a specified point in time
    - repeatedly at a specified point in time

## Storage
| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
| PersistentVolume | ![pv-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/d9236e05-767f-0c26-b28f-aba05ed5fc5a.png) | ![pv-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/2e5bd4ea-744d-b5bb-3c47-0657034f927f.png) |
| PersistentVolumeClaim | ![pvc-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/6de30fec-5712-e9b8-fa84-8ee29d849e20.png) | ![pvc-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/86c4365f-37a3-08d0-9bb1-9f0716e32f5d.png) |
| StorageClass | ![sc-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/c21278fa-2923-15a2-2041-6c3aabdf9f7d.png) | ![sc-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/64bdeec6-f96d-6560-176e-eac024358b83.png) |

- **PersistentVolume**: is a storage resource provisioned by an administrator.
- **PersistentVolumeClaim**: PersistentVolumeClaim is a user's request for and claim to a persistent volume.
- **StorageClass**: StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.

## Network
| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
| Ingress | ![ing-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/1d7e1e3d-6077-4cb4-20e8-366889c9938f.png) | ![ing-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/a5021520-b157-0c1d-7ca8-013c3eb39183.png) |
| Service | ![svc-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/73356215-fe89-e13b-a067-12b8bbf7817a.png) | ![svc-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/f9eeb3db-383a-a6e5-5e5d-419da0821a3a.png) |
| Endpoint | ![ep-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/bfe0072b-8674-0e16-0ee1-c1a5f1b415a7.png) | ![ep-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/8584a942-0017-5fa0-2e90-b9ffb9c6484e.png) |
| NetworkPolicy | ![netpol-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/c46d45e9-3c85-2ad0-8287-4cb1c4249e75.png) | ![netpol-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/cda3a37e-1027-46d7-4406-b6bc9d7f3a66.png) |

- **Ingress**: Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.
- **Service**: Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.
- **Endpoint**: Endpoints is a collection of endpoints that implement the actual service.
- **NetworkPolicy**: NetworkPolicy describes what network traffic is allowed for a set of Pods.

## RBAC Model
| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
| ServicaAccount | ![sa-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/a7f991d9-7108-54fc-f831-dd1fe736cc7b.png) | ![sa-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/9a3da5ed-2fd0-ff2a-7f7a-a90a6026832c.png) |
| User | ![user-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/67f99d11-42a7-de59-7853-1a39d0b0d0d3.png) | ![user-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/21281d56-ce66-ed4e-af70-221cf2eeb310.png) |
| Group | ![group-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/a1ff28e3-0681-3766-4477-6d4bf5bff8c0.png) | ![group-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/a8114f5f-d12a-5578-3d7d-c720be978ed2.png) |
| Role | ![role-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/89abfc14-83c0-79da-b3ff-59e030971d73.png) | ![role-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/bfce487c-be92-f3cc-4995-abd90d44d0b3.png) |
| ClusterRole | ![c-role-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/fd79f3ef-7dab-e08b-d728-7d9ac0a3b666.png) | ![c-role-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/1296005c-1cfa-a8b9-42a6-5cfa9e29bf3c.png) |
| ClusterRoleBinding | ![crb-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/a88336f2-fba0-b3bf-a3ff-4bc522395c3d.png) | ![crb-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/0515cf3d-fc86-57df-7d03-c6e28f143ecf.png) |
| RoleBinding | ![rb-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/5cbed946-1841-4023-ecbf-5ea5d6d6073c.png) | ![rb-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/d226f4d2-152b-2a22-e5b9-6648eb3e477d.png) |

- **ServicaAccount**: binds together: a name, a principal that can be authenticated and authorized * a set of secrets.
- **User**: Human user of Kubernetes cluster.
- **Group**: Set of Service Accounts or Users.
- **Role**: Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
- **ClusterRole**: ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
- **ClusterRoleBinding**: A cluster role binding grants the permissions defined in a role/clusterrole to a user or set of users. Permissions are granted cluster-wide.
- **RoleBinding**: A role binding grants the permissions defined in a role/clusterrole to a user or set of users. Permissions are granted within a namespace.

## Pods Configuration
| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
| ConfigMap | ![cm-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/370312b4-ab4c-9251-b876-a51a2fdb8848.png) | ![cm-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/f1d81c53-c21e-3ca4-86df-d6693a1087f4.png) |
| Secret | ![secret-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/8b1091b9-f4d5-bddc-6b34-7774e87ceefb.png) | ![secret-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/b5dddad4-53c0-a9e1-fd93-dcec8f895a25.png)|

- **ConfigMap**: ConfigMap holds configuration data for pods to consume.
- **Secret**: Secret holds secret data of a certain type.

## Cluster Configuration
| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
| LimitRange | ![limits-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/0f3ca83a-4df8-043b-1ada-0c7ba9f884ce.png) | ![limits-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/19325ad1-17b5-5819-cda6-a89743451050.png) |
| Quota | ![quota-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/1d1ae8ff-0502-f76c-4e8a-80e5f8220556.png) | ![quota-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/de86c3b1-41d8-30d3-2d31-7d6c15e21f00.png) |
| HorizontalPodAutoscaler | ![hpa-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/52ce915b-9d8a-8d19-39b5-ac7a12ad4057.png) | ![hpa-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/0d3e9fc7-9e5f-ae01-fcf9-248bcb2fc4b5.png) |

- **LimitRange**: LimitRange sets resource usage limits for each kind of resource in a Namespace.
- **Quota**:  ResourceQuota sets aggregate quota restrictions enforced per namespace.
- **HorizontalPodAutoscaler**: configuration of a horizontal pod autoscaler.

## Others
| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
| CustomResourceDefinition | ![crd-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/706a2df5-e772-ee11-cba1-4752cdc42c53.png) | ![crd-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/c78c1202-e83a-f0b9-1ae6-78f7bf0a5a2e.png) |
| PodSecurityPolicy | ![psp-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/d03863cf-69ec-35eb-682d-00ee757cbebe.png) | ![psp-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/f81fe69d-7f50-3dba-5bc0-013f2dede103.png) |

- **CustomResourceDefinition**: Extension of Kubernetes API.
- **PodSecurityPolicy**: governs the ability to make requests that affect the Security Context that will be applied to a pod and container.

## Infrastructure Components
| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
| Cluster |  | ![image.png](https://qiita-image-store.s3.amazonaws.com/0/309176/db4bb613-9482-8703-b9f4-0205bd90fce1.png) |
| Master | ![master-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/6fee8a0f-77a5-496d-c9bb-3fac70e05b24.png) | ![master-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/83080b39-600b-a186-ad27-e91ee45663d7.png) |
| Node | ![node-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/3832a7ee-4dd2-230b-57e0-4d6c5205362b.png) | ![node-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/0eb43058-d268-1a20-e7ae-2d2384e6f43c.png) |
| ETCD | ![etcd-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/02088e9d-ec0a-40cb-e064-3263d6d47969.png) | ![etcd-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/b9b4231c-d39d-a145-0023-98b748927a89.png) |

- **Cluster**: Kubernetes cluster.
- **Master**:  Kubernetes Control Plane.
- **Node**:  Worker machine in Kubernetes cluster.
- **ETCD**:  Kubernetes’s backing store.

[iconのgithub](https://github.com/kubernetes/community/tree/master/icons/png)に"Cluster"がなかったので[こっち](https://github.com/kubernetes/kubernetes/blob/master/logo/logo_with_border.png)から画像を持ってきてリサイズしています。

## Control Plane Components 
| kind | Labeled | Unlabeled |
|:---|:--:|:--:|
| K8s API Server | ![image.png](https://qiita-image-store.s3.amazonaws.com/0/309176/8dc0b8f4-9aff-0ef3-c93b-9253d5be5c85.png) | ![master-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/83080b39-600b-a186-ad27-e91ee45663d7.png)|
| Controller Manager | ![image.png](https://qiita-image-store.s3.amazonaws.com/0/309176/e8f3b193-9d35-9490-c945-724cafc329eb.png) | ![master-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/83080b39-600b-a186-ad27-e91ee45663d7.png) |
| Scheduler | ![image.png](https://qiita-image-store.s3.amazonaws.com/0/309176/c247c2ad-cfea-833a-a7ac-3e4f855276f9.png) | ![master-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/83080b39-600b-a186-ad27-e91ee45663d7.png)|
| Cloud Controller Manager | ![image.png](https://qiita-image-store.s3.amazonaws.com/0/309176/8e831738-223f-3402-e1a3-027aa6f6ca01.png) | ![master-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/83080b39-600b-a186-ad27-e91ee45663d7.png) |
| Kubelet | ![image.png](https://qiita-image-store.s3.amazonaws.com/0/309176/fd657481-e5ca-0a8d-848e-f47cbbe11dbd.png) | ![node-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/0eb43058-d268-1a20-e7ae-2d2384e6f43c.png) |
| Kube-proxy | ![image.png](https://qiita-image-store.s3.amazonaws.com/0/309176/b41b1721-7f33-04d9-b948-7eedce3ac60d.png) | ![node-128.png](https://qiita-image-store.s3.amazonaws.com/0/309176/0eb43058-d268-1a20-e7ae-2d2384e6f43c.png) |

- **K8s API Server**: Kubernetes API.
- **Controller Manager**:  Kubernetes controller manager.
- **Scheduler**: In charge of ensuring Pods placement.
- **Cloud Controller Manager**  Optional and External Cloud controller (experimental).
- **Kubelet**: The kubelet is the primary “node agent” that runs on each node.
- **Kube-proxy**:  The Kubernetes network proxy runs on each node. This reflects services as defined in the Kubernetes API on each node.

~~"Control Plane Components"の"Unlabeled"の大きい画像が[iconのgithub](https://github.com/kubernetes/community/tree/master/icons/png)に無いんです。(一体なぜ？)~~
"Control Plane Components"の"Unlabeled"の画像は"Master"と"Node"のものと同じなので省略されているみたいです。

# Group and links
| <img width="867" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/b1490b83-a020-a270-569e-716f3400b2fb.png"> |
|:------------------:|

# Kubernetes ressources map

| <img width="872" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/b9a3ab54-b778-ce81-244d-b598cd5b0f74.png"> |
|:------------------:|

# Diagrams examples

## Exposed Application
| <img width="808" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/ef598b4b-e83e-0203-5550-726724571389.png"> |
|:------------------:|


## Application with configuration
| <img width="811" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/a1eb73a3-713f-b204-4c24-94fd2208a291.png"> |
|:------------------:|

## Application with persistent storage
| <img width="807" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/2802e4c3-1688-f0f9-eff2-deb546860041.png"> |
|:------------------:|

## StatefulSet Architecture
| <img width="808" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/430b72a3-545a-8c16-d4f6-2a2f978ecbf1.png"> |
|:------------------:|

## RBAC model
| <img width="814" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/eb84fea8-9184-d045-a363-7a1a74191abe.png"> |
|:------------------:|

## Kube-dns example
| <img width="810" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/2892038a-7a28-2e3d-d30f-5d1daeea5b57.png"> |
|:------------------:|

## Server implementation
| <img width="837" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/88678f2d-b507-09f6-b33c-8d3d619f1d6c.png"> |
|:------------------:|

## K8s components startup
| <img width="810" alt="icono-k8s-0_3.png" src="https://qiita-image-store.s3.amazonaws.com/0/309176/b84001d6-2115-d07e-2e88-b01ab54de24b.png"> |
|:------------------:|