官术网_书友最值得收藏!

Configuration and deployment in Kubernetes

Kubernetes is a container orchestrator—it is the technology that most embodies IaC, in my opinion, because the way it deploys containers, the network architecture (load balancer, ports, and so on), and the volume management, as well as the protection of sensitive information, are described completely in the YAML specification files.

Here is a simple example of a YAML specification file:

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-demo
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80

We can see in the preceding specification file, the name of the image to deploy (ngnix), the port to open (80), and the number of replicas (2).

The Kubernetes part will be discussed in detail in Chapter 8, Managing Containers Effectively with Kubernetes.
主站蜘蛛池模板: 蒲城县| 自贡市| 佛山市| 三明市| 郁南县| 文山县| 广平县| 正定县| 墨玉县| 平塘县| 罗田县| 无为县| 长武县| 定襄县| 壤塘县| 通许县| 永春县| 德令哈市| 深水埗区| 孝义市| 崇仁县| 淳化县| 鄂伦春自治旗| 庆云县| 云梦县| 治县。| 中宁县| 东港市| 临沂市| 赫章县| 古交市| 宁化县| 当涂县| 兴宁市| 旌德县| 奉贤区| 宜黄县| 桐乡市| 清丰县| 汕头市| 隆安县|