实战练习
目标
步骤 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.24
ports:
- containerPort: 80步骤 2:创建 Service
步骤 3:模拟滚动更新 (Rolling Update)
步骤 4:清理资源
最后更新于