- Getting Started with Kubernetes(Second Edition)
- Jonathan Baier
- 96字
- 2021-07-02 22:51:29
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
推薦閱讀
- 影視后期制作(Avid Media Composer 5.0)
- Hands-On Data Science with SQL Server 2017
- HBase Design Patterns
- 機艙監測與主機遙控
- Maya 2012從入門到精通
- Ceph:Designing and Implementing Scalable Storage Systems
- 網絡化分布式系統預測控制
- 從零開始學PHP
- Word 2007,Excel 2007辦公應用融會貫通
- Applied Data Visualization with R and ggplot2
- 網絡管理工具實用詳解
- Linux Shell編程從初學到精通
- Practical AWS Networking
- 從祖先到算法:加速進化的人類文化
- Getting Started with Tableau 2018.x