- 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
推薦閱讀
- Hands-On Internet of Things with MQTT
- Mastering Proxmox(Third Edition)
- 玩轉智能機器人程小奔
- AWS:Security Best Practices on AWS
- 自主研拋機器人技術
- 大數據平臺異常檢測分析系統的若干關鍵技術研究
- 完全掌握AutoCAD 2008中文版:綜合篇
- 機器人編程實戰
- 21天學通Visual Basic
- 基于單片機的嵌入式工程開發詳解
- 激光選區熔化3D打印技術
- Linux系統管理員工具集
- DynamoDB Applied Design Patterns
- 單片機C51應用技術
- SolarWinds Server & Application Monitor:Deployment and Administration