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

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

主站蜘蛛池模板: 呼伦贝尔市| 黑河市| 醴陵市| 乐安县| 綦江县| 北辰区| 青浦区| 辽阳市| 贺州市| 北辰区| 北安市| 新田县| 东乡| 长宁区| 尉氏县| 绥芬河市| 集贤县| 海伦市| 普陀区| 重庆市| 贺州市| 吉水县| 锦州市| 秀山| 衢州市| 桐庐县| 左权县| 泊头市| 东乡县| 宜阳县| 内丘县| 饶平县| 华坪县| 久治县| 大荔县| 行唐县| 红桥区| 平凉市| 宝鸡市| 体育| 都兰县|