- Getting Started with Kubernetes
- Jonathan Baier Jesse White
- 98字
- 2021-06-10 19:47:09
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
推薦閱讀
- 我的J2EE成功之路
- 實時流計算系統(tǒng)設計與實現(xiàn)
- 分布式多媒體計算機系統(tǒng)
- Supervised Machine Learning with Python
- Ceph:Designing and Implementing Scalable Storage Systems
- 信息物理系統(tǒng)(CPS)測試與評價技術
- 工業(yè)機器人安裝與調(diào)試
- Photoshop CS5圖像處理入門、進階與提高
- 基于ARM9的小型機器人制作
- Mastering Ceph
- 手把手教你學Flash CS3
- MongoDB 4 Quick Start Guide
- 精通ROS機器人編程(原書第2版)
- JSP通用范例開發(fā)金典
- Practical Network Automation