How Kubernetes works
What is Container?
Key principles of how containers implement an isolated environment
1. Root directory isolation (chroot)
chroot)$ chroot <NEWROOT> <COMMAND>
2. Linux namespaces
$ lsns -p <pid># Run /bin/bash process with mount namespace isolated (-m) $ unshare -m /bin/bash # Run /bin/bash process with mount namespace(-m) and ipc namespace(-i) isolated $ unshare -m -i /bin/bash
3. Mount (mnt) namespace
mnt) namespace4. Process ID (pid) namespace
5. Inter-Process Communication (ipc) namespace
6. Network (net) namespace
7. Unix Time-Sharing (uts) namespace
8. User ID (user) namespace
9. Control group (cgroup)
Wrap-up: Key principles of how containers implement an isolated environment
Wrap-up: Key principles of how containers implement an isolated environmentWhat is Kubernetes Pod?
Pod is the "smallest deployable object unit"
Pod is a group of one or more containers
Cases where a Pod consists of multiple containers
It is recommended to run a single process per container
Criteria for composing a Pod
Isolation between containers in a Kubernetes Pod
PID namespace sharing in Kubernetes
Wrap-up
Concepts of Kubernetes Pod
What is a Pod?
Running multiple processes in a single container is not recommended
When a specific container in a Kubernetes Pod terminates, Kubelet restarts the container according to the restartPolicy
Kubelet restarts the container according to the restartPolicyCriteria for deciding how to compose a Pod
Isolation between containers in a Pod
What is a Pause Container?
Last updated