- Kubernetes for Developers
- Joseph Heck
- 398字
- 2021-08-27 19:04:12
Kubernetes concept – container
Kubernetes (and other technologies in this space) are all about managing and orchestrating containers. A container is really a name wrapped around a set of Linux technologies, the two most prominent being the container image format and the way Linux can isolate processes from one another, leveraging cgroups.
For all practical purposes, when someone is speaking of a container, they are generally implying that there is an image with everything needed to run a single process. In this context, a container is not only the image, but also the information about what to invoke and how to run it. Containers also act like they have their own network access. In reality, it's being shared by the Linux operating system that's running the containers.
When we want to write code to run under Kubernetes, we will always be talking about packaging it up and preparing it to run within a container. The more complex examples later in the book will utilize multiple containers all working together.
If you usually develop in Python, then you are likely familiar with using something like pip to download libraries and modules that you need, and you invoke your program with a command akin to python your_file. If you're a Node developer, then it is more likely you're familiar with npm or yarn to install the dependencies you need, and you run your code with node your_file.
If you wanted to wrap that all up and run it on another machine, you would likely either redo all the instructions for downloading the libraries and running the code, or perhaps ZIP up the whole directory and move it where you want to run it. A container is a way to collect all the information together into a single image so that it can be easily moved around, installed, and run on a Linux operating system. Originally created by Docker, the specifications are now maintained by the Open Container Initiative (OCI) (https://www.opencontainers.org).
While a container is the smallest building block of what goes into Kubernetes, the smallest unit that Kubernetes works with is a Pod.
- Google Cloud Platform Cookbook
- Deep Learning Quick Reference
- 網絡服務器架設(Windows Server+Linux Server)
- 大數據改變世界
- Supervised Machine Learning with Python
- JSF2和RichFaces4使用指南
- ESP8266 Home Automation Projects
- JavaScript典型應用與最佳實踐
- 數據庫系統原理及應用教程(第5版)
- Python:Data Analytics and Visualization
- 貫通Java Web開發三劍客
- 從零開始學C++
- 新編計算機圖形學
- 過程控制系統
- Mastering MongoDB 3.x