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

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
主站蜘蛛池模板: 富宁县| 酉阳| 壶关县| 汶上县| 仙桃市| 和政县| 宜良县| 黄梅县| 桂阳县| 仙游县| 克山县| 四川省| 富民县| 固始县| 安义县| 昌都县| 乐陵市| 北安市| 织金县| 桓台县| 乃东县| 抚顺县| 海丰县| 绿春县| 宁蒗| 宕昌县| 正安县| 普陀区| 融水| 英吉沙县| 高碑店市| 龙井市| 肇源县| 天祝| 江陵县| 龙口市| 金坛市| 乌审旗| 永登县| 赣州市| 手机|