- 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
推薦閱讀
- 大數(shù)據(jù)技術(shù)基礎(chǔ)
- 精通MATLAB神經(jīng)網(wǎng)絡(luò)
- Java開發(fā)技術(shù)全程指南
- Effective DevOps with AWS
- 網(wǎng)絡(luò)綜合布線技術(shù)
- 流處理器研究與設(shè)計
- Deep Reinforcement Learning Hands-On
- 空間機(jī)械臂建模、規(guī)劃與控制
- The DevOps 2.1 Toolkit:Docker Swarm
- Windows安全指南
- Artificial Intelligence By Example
- Learning Apache Apex
- Dreamweaver+Photoshop+Flash+Fireworks網(wǎng)站建設(shè)與網(wǎng)頁設(shè)計完全實(shí)用
- 大數(shù)據(jù)素質(zhì)讀本
- 從零開始學(xué)ASP.NET