You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure Kubernetes audit policy for control plane nodes to enable comprehensive logging and monitoring
10
+
---
11
+
12
+
## Kubernetes Audit Policy Support
13
+
14
+
EKS Anywhere configures a default audit policy for all clusters to provide basic logging and monitoring of API server requests. This default policy covers essential security events and resource access patterns.
15
+
16
+
{{% alert title="Note" color="primary" %}}
17
+
All EKS Anywhere clusters include audit logging with a sensible default policy. The `auditPolicyContent` field is only needed if you want to customize the audit policy beyond the default configuration.
18
+
{{% /alert %}}
19
+
20
+
## Customizing Audit Policy (Optional)
21
+
22
+
If you need to customize the audit policy beyond the default configuration, you can override it by adding the `auditPolicyContent` field to the `controlPlaneConfiguration` section of your cluster configuration:
23
+
24
+
```yaml
25
+
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
26
+
kind: Cluster
27
+
metadata:
28
+
name: my-cluster
29
+
spec:
30
+
controlPlaneConfiguration:
31
+
count: 1
32
+
endpoint:
33
+
host: "192.168.1.100"
34
+
machineGroupRef:
35
+
kind: VSphereMachineConfig
36
+
name: my-cluster-control-plane
37
+
auditPolicyContent: |
38
+
apiVersion: audit.k8s.io/v1
39
+
kind: Policy
40
+
rules:
41
+
- level: RequestResponse
42
+
resources:
43
+
- group: ""
44
+
resources:
45
+
- pods
46
+
- services
47
+
- secrets
48
+
- configmaps
49
+
```
50
+
51
+
## Updating Audit Policy
52
+
53
+
To modify the audit policy on an existing cluster:
54
+
55
+
1. Add/Update the `auditPolicyContent` in your cluster configuration file
0 commit comments