모든 아웃바운드 트래픽 로깅
모든 아웃바운드 트래픽 로깅 (MeshAccessLogs)
MeshAccessLog 정책을 사용하면 메시에서 바깥으로 나가는 모든 트래픽을 로그로 기록할 수 있어요
출처: 문서
본문
나가는 모든 트래픽 로깅하기
MeshAccessLog로 나가는 모든 트래픽을 로깅해요.
구성
Kubernetes
apiVersion: kuma.io/v1alpha1
kind: MeshAccessLog
metadata:
name: all-outgoing-traffic
namespace: kuma-demo
labels:
kuma.io/mesh: default
spec:
to:
- targetRef:
kind: Mesh
default:
backends:
- type: File
file:
path: "/dev/stdout"
Universal
type: MeshAccessLog
name: all-outgoing-traffic
mesh: default
spec:
to:
- targetRef:
kind: Mesh
default:
backends:
- type: File
file:
path: "/dev/stdout"
Terraform
현재 구성에 맞게 konnect_mesh_control_plane.my_meshcontrolplane.id와 konnect_mesh.my_mesh.name을 조정하세요. {: .text-sm}
resource "konnect_mesh_access_log" "all_outgoing_traffic" {
provider = konnect-beta
type = "MeshAccessLog"
name = "all-outgoing-traffic"
spec = {
to = [
{
target_ref = {
kind = "Mesh"
}
default = {
backends = [
{
type = "File"
file = {
path = "/dev/stdout"
}
}
]
}
}
]
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}
관련 리소스
더 알아보기 (Learn more)
- 로그를 수집·전송할 OpenTelemetry 컬렉터를 직접 배포하는 절차를 확인해요 — Deploy an OpenTelemetry collector
- 파일 백엔드 외에 로그를 내보낼 때 함께 쓰이는 OpenTelemetry 백엔드 정책의 세부 설정을 살펴봐요 — MeshOpenTelemetryBackend