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

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

主站蜘蛛池模板: 洛宁县| 德令哈市| 习水县| 横山县| 平阳县| 普兰县| 女性| 鄱阳县| 文昌市| 眉山市| 固阳县| 沈丘县| 上思县| 上饶县| 博兴县| 桃源县| 宜丰县| 宁津县| 调兵山市| 克东县| 乌拉特中旗| 甘德县| 灵武市| 广汉市| 南川市| 南投县| 自贡市| 信宜市| 五指山市| 兴文县| 无棣县| 新和县| 桂东县| 河间市| 渝北区| 诸暨市| 浦县| 高雄县| 潮州市| 曲阳县| 泸定县|