改改改

This commit is contained in:
2026-01-09 17:50:32 +08:00
parent cf14d8a6db
commit 0384834345
37 changed files with 1944 additions and 2 deletions

View File

@@ -0,0 +1,43 @@
# 部署 Deployment集群级聚合转发
apiVersion: apps/v1
kind: Deployment
metadata:
name: otel-collector-deployment
namespace: monitoring
labels:
app: otel-collector-deployment
spec:
replicas: 1 # 测试环境单副本生产可扩为2
selector:
matchLabels:
app: otel-collector-deployment
template:
metadata:
labels:
app: otel-collector-deployment
spec:
serviceAccountName: otel-collector
containers:
- name: otel-collector
image: otel/opentelemetry-collector-contrib:latest
args: ["--config=/etc/otel-collector/config.yaml"]
volumeMounts:
- name: otel-config
mountPath: /etc/otel-collector
# 暴露端口
ports:
- containerPort: 4317 # OTLP gRPC
- containerPort: 4318 # OTLP HTTP
- containerPort: 8888 # 自身监控
# 资源限制
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
volumes:
- name: otel-config
configMap:
name: otel-collector-config