13.5 实战练习
13.5.1 目标
13.5.2 步骤 1:创建 Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.27
ports:
- containerPort: 8013.5.3 步骤 2:创建 Service
13.5.4 步骤 3:模拟滚动更新
13.5.5 步骤 4:清理资源
最后更新于