본문으로 건너뛰기

Kubernetes Audit Logs Integration

Overview

Kubernetes audit logs record all requests to the API server, providing visibility into cluster operations and security events. KYRA MDR collects Kubernetes audit logs for monitoring RBAC changes, workload deployments, and security policy violations. Supports Kubernetes 1.24+.

Prerequisites

  • A KYRA MDR Collector installed and running
  • Kubernetes cluster with administrative access
  • API server audit logging enabled
  • Network connectivity from the cluster to the collector

Configuration

Configure Kubernetes API server audit logging:

  1. Create an audit policy file:
/etc/kubernetes/audit-policy.yaml
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: RequestResponse
resources:
- group: ""
resources: ["secrets", "configmaps"]
- level: Metadata
resources:
- group: ""
resources: ["pods", "services"]
- level: Request
omitStages: ["RequestReceived"]
  1. Configure the API server with audit webhook:
--audit-policy-file=/etc/kubernetes/audit-policy.yaml
--audit-webhook-config-file=/etc/kubernetes/audit-webhook.yaml
  1. Create the webhook configuration pointing to the KYRA MDR collector

Collected Log Types

Log TypeDescriptionSecurity Use
API RequestsAll API server requestsUnauthorized access detection
RBAC ChangesRole and binding modificationsPrivilege escalation detection
Secrets AccessSecret read and write eventsSensitive data monitoring
Pod OperationsPod creation, deletion, execContainer security monitoring
NamespaceNamespace lifecycle eventsIsolation boundary monitoring
Network PolicyNetwork policy changesNetwork segmentation auditing

Troubleshooting

No audit logs: Verify the audit policy file is correctly referenced by the API server.

High volume: Use the audit policy to filter events by level (None, Metadata, Request, RequestResponse).

Managed clusters: For EKS, GKE, or AKS, audit logging is configured through the cloud provider’s console.

Contact kyra@seekerslab.com for support.