准备测试环境
更新时间:2026-04-24 03:03:30
本节介绍如何创建测试部署,用于后续验证 Pod 故障注入效果。
创建测试部署
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-pod
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: nginx-pod
template:
metadata:
labels:
app: nginx-pod
spec:
containers:
- name: nginx
image: nginx:stable-perl
ports:
- containerPort: 80