跳到主要内容

测试服务

压测客户端

apiVersion: apps/v1
kind: Deployment
metadata:
name: hey
spec:
replicas: 1
selector:
matchLabels:
app: hey
template:
metadata:
labels:
app: hey
spec:
containers:
- image: imroc/hey:latest
name: hey
command: ["sleep", "infinity"]

测试服务端

apiVersion: v1
kind: Service
metadata:
labels:
app: nginx
name: nginx
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx:latest
name: nginx