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

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
主站蜘蛛池模板: 井陉县| 仁寿县| 中宁县| 博野县| 鞍山市| 宁波市| 高碑店市| 禹州市| 义乌市| 新竹市| 绵竹市| 普安县| 上虞市| 渝中区| 和平县| 观塘区| 曲阜市| 延长县| 鸡西市| 海口市| 荃湾区| 黄浦区| 永川市| 阜新| 四平市| 德清县| 洪泽县| 祁连县| 龙山县| 武冈市| 安康市| 荔浦县| 三门峡市| 弥渡县| 兰西县| 扶沟县| 泌阳县| 那坡县| 宜丰县| 金坛市| 天祝|