Containerization in clear language: from the very basics to the intricacies of working with Kubernetes



, Docker , Kubernetes . «» Southbridge . , .

,





?



. . , , , . . , . , vmware vsphere, , QEMU KVM, Red Hat β€” Red Hat Virtualization. Windows Hyper-V.



. : , , .



?



, . . , , , . , .



, ?



, , , , . Linux β€” OpenVZ, Virtuozzo. OpenVZ. OpenVZ, .



, ?



. ( Intel, AMD, VMX).



, , . Docker, , cgroups Linux.



– ? , ?



. . .



? , ?



. .



, ? : , . - . , . ?



β€” , : , init, systemd . ? , , . , , , , . .



β€” . , , . , , .



Docker ( ), , .



, . , Linux VMware, Windows. Linux, Linux. , , β€” cgroups namespace.



? , ? , , ?



, . , , , - ( ). 10 , . , , .



, , , Alpine Linux, 20 50 . , .



, Docker , - ?



. Docker- . - , Alpine, CentOS Ubuntu. , .



? Alpine Linux.



, .



Linux ?



, .



, , .



, Docker β€” .



? , , ?



β€” .



. - , - , ?



, . - , .



Docker ? , - Linux?



. . Docker , namespace cgroups , , . , , .



Docker . , , , β€” .



, ? , : - , …



, , , . . , , , , stdout/stderr , .



Docker- , . , , , β€” , , β€” . stdout/stderr, Docker ElasticSearch, ClickHouse - . , . , , .



, . , , . , , , . , , .



Windows? , , , Linux.



, , . Windows-, . , Windows . , , , , . Windows Windows. Windows Server Containerization, (Windows-, ).



, Docker Windows, . Docker β€” Linux, , .



, . β€” , , , . , . , . Microsoft Hyper-V, Linux QEMU KVM, vSphere . , .



? Docker, .



β€” , . – , , namespace cgroups. , Docker .



, Linux, ? API Linux -, …



- .



, ?



, API Windows API Linux β€” . Docker macOS. .



, macOS Linux .



. macOS UNIX-like, Linux. , GNU β€” is not UNIX ( ). macOS , , . , Linux. .



Docker Windows, macOS β€” , .



, , ?



, . Docker Desktop , . , . - Docker, Windows macOS, , . .



, Linux , WSL (Windows Subsystem for Linux)?



, OpenNET .



? , ?



, WSL β€” Wine . API . Wine β€” API Linux, WSL β€” . . , .





, , , : 10, 20, 40, 100 . . ?



, . , , , . , . Docker, Docker Compose . , , - , . , - Service Discovery .



, . , , . , , , , , .





, «»



Docker Compose ? .



Docker Compose, , . - . , .



. ? , ?



, β€” - Kubernetes. , Google. Google , .



, , Docker Swarm, Mesos, OpenShift , - Kubernetes. , , , Kubernetes.



, Kubernetes?



, . , Kubernetes . , , ( , ) : Β«, Kubernetes . β€” !Β» .



Kubernetes . Kubernetes , , , , . , Kubernetes.



, : Β« !Β» , .



Kubernetes Docker ?



Kubernetes , Docker. Kubernetes , Container Runtime Interface. , , Container Runtime Interface, Kubernetes. , rkt.



, Docker Kubernetes - . Docker . Docker β€” , , . , Kubernetes, - .



. , , , . , Docker, .



Docker ?



, Docker . , containerd . , 1.11, , Docker containerd . , Docker containerd, containerd, runC, .



- Podman: Podman β€” Docker, . , Docker.



, Kubernetes ? ? , Kubernetes β€” - , , ?



, . , . .



, Kubernetes β€” . , , .



Kubernetes , ( ). :



  1. . , .
  2. pull-. , , , , . : , . , .


. β€” API-. , REST API ( , ): http-, . , API, API . API, : (, ), .



API- , etcd. Etcd β€” key-value , Β«-Β». API- β€” , .



- kubernetes?



, , .



Redis , ?



Redis , ( ). etcd , , .



, , Kubernetes etcd, , , key-value -.



API- , etcd , , . etcd . , β€” , .



- , , API-. , , , kubectl. , , . yaml-, , . . etcd API-.



, watch'. DDoS' . , β€” kube-controller-manager. , Kubernetes. : node-controller, endpoint-controller. , Kubernetes, , . : , , - .



. , , - , , β€” , - , . , etcd, . , , . , ReplicaSet. . , . .



?



.



?



. β€” β€” .



.



, .



?



. .



ReplicaSet , , . , .



, ReplicaSet, . ( ).



, , , ReplicaSet, ReplicaSet controller -, ReplicaSet , , , etcd API- .



. , , , etcd . , scheduler. . , . , .



, , , 1 , 512 , .



Docker- ?



, .



-.



.



scheduler’ , , . , , , , .



? , - , , .



. . , . priority class β€” , .



, : . , . priority class . . , Kubernetes , ( Node Controller, ), , , , . Scheduler .



, , .



?



, . pending, , . scheduler … , , nodeName β€” . scheduler β€” . Scheduler , , Node β„–2, , API- etcd . , kubelet.



Kubelet β€” "node agent", , . API- . , , , Β« Β» , , . : Β«! !Β» , , . Docker API, , , Docker, .



Kubelet, , Docker ?



, , . , , Docker . , Docker API, . , , API-.



- ?



- Kubelet. , . , , , β€” , . . β€” .



β€” ?



β€” , Kubelet.



, ?



, .



, . Kubelet - , stdout ? . , stdout , - kubernetes - , ?



, . ( ) β€” Docker. ( ) β€” , , - - β€” Kubelet, , .



:



  1. http-get β€” http- , , , , , . 200 399 β€” , 301 β€” . 404 β€” . 500 .
  2. exec β€” - , - , . , select 1, , .
  3. tcp socket β€” Kubelet . , .


: liveness, readiness startup .



Liveness β€” . Kubelet , . , , , .



Readiness β€” , . , . , , .



Startup – , , . . startup , .



Kubernetes? ?



, 5000+, , . 110 , 110 .



β€” ? ?



β€” , . , - , - , , Kubernetes.



Kubernetes . : Β« Β». : Β« Β». , . , , nginx php-fpm , .



, β€” . -, 2-3 , , . , , pause , namespace, namespace, .



. Kubernetes Ansible. !



iamitbeard




All Articles