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

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
主站蜘蛛池模板: 新营市| 抚远县| 三江| 赣榆县| 凤庆县| 和龙市| 瓮安县| 全州县| 西贡区| 噶尔县| 精河县| 湖南省| 涪陵区| 磴口县| 巴林右旗| 文昌市| 弥勒县| 安塞县| 旅游| 沙河市| 德州市| 瑞丽市| 蒲城县| 大丰市| 鹤壁市| 库车县| 紫云| 迁西县| 天镇县| 汉寿县| 雷州市| 甘洛县| 涞源县| 蒲城县| 资阳市| 新郑市| 崇义县| 和顺县| 衡南县| 北京市| 庆城县|