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

Replica sets

As discussed earlier, replica sets are the new and improved version of replication controllers. They take advantage of set-based label selection, but they are still considered beta at time of this writing.
Here is an example of a ReplicaSet based on and similar to the ReplicationController in listing 2-4:

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

Listing 2-6: nodejs-labels-replicaset.yaml

主站蜘蛛池模板: 惠州市| 云阳县| 汤阴县| 无为县| 甘德县| 遂平县| 呼伦贝尔市| 卢湾区| 林芝县| 淅川县| 黑龙江省| 延安市| 淮安市| 萨嘎县| 化德县| 孝感市| 南木林县| 离岛区| 龙泉市| 壶关县| 浦江县| 平昌县| 中西区| 太湖县| 宁都县| 罗定市| 成安县| 北辰区| 鲜城| 喀喇沁旗| 桦川县| 嘉义县| 调兵山市| 南陵县| 岳阳市| 黄冈市| 岳西县| 赤城县| 蒙自县| 义乌市| 鹰潭市|