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

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
主站蜘蛛池模板: 朝阳县| 邯郸市| 康乐县| 高青县| 方山县| 延边| 定边县| 若尔盖县| 安乡县| 西乌珠穆沁旗| 安徽省| 昌吉市| 高安市| 阜城县| 京山县| 聂拉木县| 涟源市| 北川| 宁陵县| 辛集市| 英德市| 阜阳市| 雷州市| 广宁县| 绥中县| 和平区| 泰顺县| 济南市| 德阳市| 云霄县| 泗水县| 东山县| 陈巴尔虎旗| 尼木县| 宁武县| 石楼县| 延安市| 叶城县| 崇信县| 揭阳市| 嘉善县|