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

Replica sets

As discussed earlier, replica sets are the new and improved version of replication controllers. Here's a basic example of their functionality, which we'll expand further in Chapter 4, Implementing Reliable Container-Native Applications, with advanced concepts.
Here is an example of ReplicaSet based on and similar to the ReplicationController. Name this file as nodejs-labels-replicaset.yaml:

apiVersion: extensions/v1beta1 
kind: ReplicaSet
metadata:
name: node-js-rs
spec:
replicas: 3
selector:
matchLabels:
app: node-js-express
deployment: test
matchExpressions:
- {key: name, operator: In, values: [node-js-rs]}
template:
metadata:
labels:
name: node-js-rs
app: node-js-express
deployment: test
spec:
containers:
- name: node-js-rs
image: jonbaier/node-express-info:latest
ports:
- containerPort: 80
主站蜘蛛池模板: 恭城| 类乌齐县| 皋兰县| 聂拉木县| 琼海市| 博罗县| 融水| 威海市| 静安区| 丹江口市| 黎川县| 大宁县| 安溪县| 方城县| 青龙| 兴山县| 布尔津县| 建宁县| 雅江县| 沁水县| 东丽区| 万安县| 叶城县| 盱眙县| 利川市| 保亭| 西盟| 固安县| 长春市| 肇源县| 珠海市| 临潭县| 如东县| 额济纳旗| 东海县| 云南省| 景洪市| 元谋县| 临颍县| 资兴市| 利川市|