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

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

主站蜘蛛池模板: 土默特右旗| 电白县| 宝丰县| 大悟县| 乐山市| 上栗县| 登封市| 盐池县| 库车县| 应用必备| 南陵县| 白城市| 丹阳市| 海淀区| 马关县| 高邮市| 松溪县| 汝阳县| 六安市| 清流县| 藁城市| 玛多县| 乌拉特中旗| 曲松县| 南昌县| 道真| 祥云县| 贡山| 盱眙县| 郸城县| 义乌市| 徐闻县| 广汉市| 成安县| 礼泉县| 深州市| 桦甸市| 二连浩特市| 清流县| 福安市| 凌云县|