Skip to content

Commit a538390

Browse files
formatting cleanup
1 parent 7a262d6 commit a538390

File tree

6 files changed

+240
-74
lines changed

6 files changed

+240
-74
lines changed
Lines changed: 77 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,128 @@
11
---
2-
Title: Log collector RBAC
2+
Title: Log collector RBAC examples
33
alwaysopen: false
44
categories:
55
- docs
66
- operate
77
- kubernetes
8-
description: RBAC configurations for Redis Enterprise log collector in all and restricted modes.
8+
description: YAML examples for configuring RBAC permissions for the Redis Enterprise log collector tool in restricted and all modes.
99
linkTitle: Log collector RBAC
10-
weight: 90
10+
weight: 50
1111
---
1212

13-
This page provides YAML examples for configuring RBAC permissions for the Redis Enterprise log collector tool.
13+
This page provides YAML examples for configuring RBAC permissions for the Redis Enterprise log collector tool. The log collector requires different permission levels depending on the collection mode you choose.
1414

15-
## Overview
15+
For complete log collection instructions, see [Collect logs]({{< relref "/operate/kubernetes/logs/collect-logs" >}}).
1616

17-
The Redis Enterprise log collector script helps gather diagnostic information for troubleshooting.
18-
The log collector requires different permission levels depending on the collection mode you choose.
19-
It has two collection modes that require different RBAC permissions:
20-
h
21-
- **Restricted mode** (recommended): Collects only Redis Enterprise resources with minimal security exposure. Default for versions 6.2.18-3+.
22-
- **All mode**: Collects comprehensive cluster information including nodes, storage classes, and operator resources. Use when specifically requested by Redis Support.
17+
## Prerequisites
2318

24-
## RBAC configurations
19+
- [Deployment]({{< relref "/operate/kubernetes/deployment" >}}) must be installed
20+
- Appropriate permissions to create RBAC resources in target namespaces
21+
- Understanding of your deployment model (single namespace, multi-namespace, etc.)
2522

26-
### Restricted mode
23+
## Collection modes
2724

28-
{{<embed-md "k8s/log_collector_role_restricted_mode.md">}}
25+
The log collector has two collection modes that require different RBAC permissions:
2926

30-
### All mode
27+
- **Restricted mode** (recommended): Collects only Redis Enterprise resources with minimal security exposure. Default for versions 6.2.18-3 and later.
28+
- **All mode**: Collects comprehensive cluster information including nodes, storage classes, and operator resources. Use when specifically requested by Redis Support.
3129

32-
{{<embed-md "k8s/log_collector_role_all_mode.md">}}
30+
## Restricted mode
3331

34-
{{< note >}}
35-
For the complete list of resources and permissions required by each mode, refer to the role definitions in the YAML files above.
36-
{{< /note >}}
32+
The restricted mode configuration provides minimal permissions for collecting Redis Enterprise resources only.
3733

38-
## Applying RBAC configurations
34+
{{<embed-yaml "k8s/log_collector_role_restricted_mode.md" "log-collector-restricted-rbac.yaml">}}
3935

40-
### Namespace requirements
36+
Restricted mode configuration:
37+
- `Role`: Namespace-scoped permissions for Redis Enterprise resources
38+
- `ClusterRole`: Cluster-wide permissions for CRDs and basic cluster resources
39+
- `rules`: Minimal permissions for Redis Enterprise diagnostics
4140

42-
The Role and RoleBinding must be created in every namespace where you need to collect logs. This varies based on your deployment model:
41+
Key permissions:
42+
- `pods, pods/log, pods/exec`: Access to pod information and logs
43+
- `app.redislabs.com/*`: All Redis Enterprise custom resources
44+
- `persistentvolumes`: Storage information for troubleshooting
4345

44-
- **Single namespace**: Apply to the namespace where Redis Enterprise runs
45-
- **Multi-namespace with single REC**: Apply to the REC namespace plus each REDB namespace
46-
- **Multi-namespace with multiple RECs**: Apply to each REC namespace
46+
## All mode
4747

48-
The ClusterRole and ClusterRoleBinding need to be created only once per cluster.
48+
The all mode configuration provides comprehensive permissions for collecting detailed cluster information.
49+
50+
{{<embed-yaml "k8s/log_collector_role_all_mode.md" "log-collector-all-rbac.yaml">}}
51+
52+
All mode configuration:
53+
- `Role`: Extended namespace permissions including operator resources
54+
- `ClusterRole`: Additional cluster-wide permissions for nodes and storage
55+
- `rules`: Comprehensive permissions for full cluster diagnostics
4956

50-
{{< note >}}
51-
Each YAML file contains both Role and ClusterRole objects. Running `kubectl apply` installs both components. You can safely run the command multiple times with different namespaces.
52-
{{< /note >}}
57+
Additional permissions in all mode:
58+
- `nodes`: Node information and status
59+
- `storageclasses, volumeattachments`: Storage system details
60+
- `operators.coreos.com/*`: OpenShift operator information
61+
- `networking.istio.io/*`: Istio service mesh resources
62+
63+
## Apply the configuration
5364

5465
### Manual deployment
5566

56-
If you prefer to apply the configurations manually, save the YAML content to local files and apply them:
67+
To apply the RBAC configurations manually:
5768

5869
```bash
59-
# Save the YAML content to a file
60-
kubectl apply -f log-collector-rbac.yaml --namespace <namespace>
70+
# Apply restricted mode RBAC
71+
kubectl apply -f log-collector-restricted-rbac.yaml --namespace <namespace>
72+
73+
# Apply all mode RBAC
74+
kubectl apply -f log-collector-all-rbac.yaml --namespace <namespace>
6175
```
76+
### Namespace requirements
6277

63-
## Usage
78+
The Role and RoleBinding must be created in every namespace where you need to collect logs:
6479

65-
After applying the RBAC configuration, run the log collector:
80+
- **Single namespace**: Apply to the namespace where Redis Enterprise runs
81+
- **Multi-namespace with single REC**: Apply to the REC namespace plus each REDB namespace
82+
- **Multi-namespace with multiple RECs**: Apply to each REC namespace
6683

67-
```bash
68-
# Restricted mode (default for 6.2.18-3+)
69-
python log_collector.py -m restricted -n <namespace>
84+
The ClusterRole and ClusterRoleBinding need to be created only once per cluster.
7085

71-
# All mode
72-
python log_collector.py -m all -n <namespace>
73-
```
86+
Edit the values in the downloaded YAML file for your specific setup, updating the namespace references and role binding subjects to match your environment.
7487

7588
## Security considerations
7689

77-
- **Use restricted mode** unless you specifically need additional cluster information
78-
- **Limit namespace access** to only where log collection is needed
79-
- **Handle collected data** according to your organization's security policies (logs may contain sensitive information)
90+
### Best practices
91+
92+
- Use restricted mode unless you specifically need additional cluster information
93+
- Limit namespace access to only where log collection is needed
94+
- Handle collected data according to your organization's security policies
8095

8196
### Secrets permission explanation
8297

8398
The RBAC configurations request read access to secrets in the collected namespaces. **Secrets are not collected or included in the log package sent to Redis Support.** This permission is required because:
8499

85-
- The log collector uses Helm commands (`helm list`, `helm get all`) to gather information about Redis Enterprise Helm chart deployments
100+
- The log collector uses Helm commands (`helm list`, `helm get all`) to gather Redis Enterprise Helm chart deployment information
86101
- Helm stores its deployment metadata in Kubernetes secrets
87-
- For Redis Enterprise charts, this metadata contains only deployment configuration (not sensitive data), but follows Helm's standard storage pattern
102+
- This metadata contains only deployment configuration (not sensitive data)
88103

89104
If your security policies prohibit secrets access, you can remove the secrets permission from the Role, but this will limit the log collector's ability to gather Helm deployment information.
90105

91106
## Troubleshooting
92107

93-
If you encounter permission errors, verify that roles and bindings are applied correctly in the target namespaces. For missing resources, ensure the ClusterRole is applied and consider switching to all mode if additional resources are needed.
108+
### Permission errors
109+
110+
- Verify that roles and bindings are applied correctly in the target namespaces
111+
- Check that the ClusterRole is applied cluster-wide
112+
- Ensure the service account has proper role bindings
113+
114+
### Missing resources
115+
116+
- Consider switching to all mode if additional cluster resources are needed
117+
- Verify that custom resource definitions are installed
118+
- Check that the operator has proper permissions
119+
120+
## Next steps
121+
122+
- [Collect logs]({{< relref "/operate/kubernetes/logs/collect-logs" >}})
94123

95124
## Related documentation
96125

97-
- [Collect logs guide]({{< relref "/operate/kubernetes/logs/collect-logs" >}})
98126
- [Kubernetes RBAC documentation](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
99-
- [Redis Enterprise troubleshooting]({{< relref "/operate/kubernetes/logs" >}})
127+
- [Logs]({{< relref "/operate/kubernetes/logs" >}})
128+
- [Deployment]({{< relref "/operate/kubernetes/deployment" >}})

content/operate/kubernetes/reference/_index.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ categories:
55
- docs
66
- operate
77
- kubernetes
8-
description: API reference and guides for managing Redis Enterprise custom resources on Kubernetes.
8+
description: Resources to help you manage Redis Enterprise custom resources on Kubernetes.
99
hideListLinks: true
1010
linkTitle: Reference
1111
weight: 89
1212
---
1313

1414
Reference documentation for Redis Enterprise custom resources, including API specifications and practical guides for creating, configuring, and managing Redis Enterprise deployments on Kubernetes.
1515

16-
## Working with custom resources
16+
## Work with custom resources
1717

1818
Redis Enterprise for Kubernetes uses custom resources to manage clusters and databases. You can create, modify, and delete these resources using standard Kubernetes tools.
1919

20-
### Creating custom resources
20+
### Create custom resources
2121

2222
Create custom resources using `kubectl apply` with YAML manifests:
2323

@@ -26,7 +26,7 @@ kubectl apply -f my-redis-cluster.yaml
2626
kubectl apply -f my-redis-database.yaml
2727
```
2828

29-
### Viewing custom resources
29+
### View custom resources
3030

3131
List and inspect existing custom resources:
3232

@@ -48,7 +48,7 @@ kubectl describe rec my-cluster
4848
kubectl describe redb my-database
4949
```
5050

51-
### Modifying custom resources
51+
### Modify custom resources
5252

5353
Update custom resources by editing the YAML manifest and reapplying:
5454

@@ -61,17 +61,6 @@ kubectl edit rec my-cluster
6161
kubectl edit redb my-database
6262
```
6363

64-
### Deleting custom resources
65-
66-
Remove custom resources when no longer needed:
67-
68-
```bash
69-
kubectl delete redb my-database
70-
kubectl delete rec my-cluster
71-
```
72-
73-
**Important:** Always delete databases (REDB) before deleting the cluster (REC) to ensure proper cleanup.
74-
7564
## YAML examples
7665

7766
Complete YAML examples for common deployment scenarios:
@@ -89,12 +78,12 @@ Complete YAML examples for common deployment scenarios:
8978

9079
Complete API specifications for all Redis Enterprise custom resources:
9180

92-
### Core resources
81+
Core resources:
9382

9483
- [Redis Enterprise cluster API (REC)]({{< relref "/operate/kubernetes/reference/redis_enterprise_cluster_api" >}}) - Manage Redis Enterprise clusters
9584
- [Redis Enterprise database API (REDB)]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api" >}}) - Manage Redis databases
9685

97-
### Active-Active resources
86+
Active-Active resources:
9887

9988
- [Active-Active database API (REAADB)]({{< relref "/operate/kubernetes/reference/redis_enterprise_active_active_database_api" >}}) - Manage Active-Active databases
10089
- [Remote cluster API (RERC)]({{< relref "/operate/kubernetes/reference/redis_enterprise_remote_cluster_api" >}}) - Configure remote cluster connections

content/operate/kubernetes/reference/yaml/_index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ kubectl get events --sort-by=.metadata.creationTimestamp
7272
- [Rack awareness examples]({{< relref "/operate/kubernetes/reference/yaml-examples/rack-awareness" >}}) - Rack-aware cluster configuration and required RBAC
7373
- [Active-Active examples]({{< relref "/operate/kubernetes/reference/yaml-examples/active-active" >}}) - Multi-cluster Active-Active database setup
7474
- [Multi-namespace examples]({{< relref "/operate/kubernetes/reference/yaml-examples/multi-namespace" >}}) - Cross-namespace operator and cluster configurations
75+
- [Log collector RBAC examples]({{< relref "/operate/kubernetes/reference/yaml-examples/log-collector-rbac" >}}) - RBAC permissions for log collection in restricted and all modes
7576

7677
## Best practices
7778

@@ -81,7 +82,7 @@ kubectl get events --sort-by=.metadata.creationTimestamp
8182

8283
## Related documentation
8384

84-
- [API reference]({{< relref "/operate/kubernetes/reference" >}}) - Complete API specifications for all custom resources
85-
- [Deploy on Kubernetes]({{< relref "/operate/kubernetes/deployment/quick-start" >}}) - Step-by-step deployment guide
86-
- [Multi-namespace deployment]({{< relref "/operate/kubernetes/re-clusters/multi-namespace" >}}) - Detailed multi-namespace setup guide
85+
- [Reference]({{< relref "/operate/kubernetes/reference" >}}) - Complete API specifications for all custom resources
86+
- [Deploy Redis Enterprise Software for Kubernetes]({{< relref "/operate/kubernetes/deployment/quick-start" >}}) - Step-by-step deployment instructions
87+
- [Manage databases in multiple namespaces]({{< relref "/operate/kubernetes/re-clusters/multi-namespace" >}}) - Detailed multi-namespace setup instructions
8788
- [Active-Active databases]({{< relref "/operate/kubernetes/active-active" >}}) - Active-Active configuration and management

content/operate/kubernetes/reference/yaml/active-active.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This example shows a two-cluster Active-Active setup:
2020
- Cluster 1: `rec-chicago` in namespace `ns-chicago`
2121
- Cluster 2: `rec-boston` in namespace `ns-boston`
2222

23-
For complete deployment instructions, see the [Active-Active database guide]({{< relref "/operate/kubernetes/active-active" >}}).
23+
For complete deployment instructions, see [Active-Active databases]({{< relref "/operate/kubernetes/active-active" >}}).
2424

2525
## RERC for Chicago cluster
2626

@@ -53,11 +53,11 @@ Edit the downloaded YAML file to add global database settings such as memory all
5353

5454
## Applying the configuration
5555

56-
To deploy Active-Active databases using these YAML files, follow the [Create Active-Active database (REAADB)]({{< relref "/operate/kubernetes/active-active/create-reaadb" >}}) guide, which provides detailed instructions for preparing clusters, creating RERC resources, and deploying REAADB configurations.
56+
To deploy Active-Active databases using these YAML files, follow [Create Active-Active database (REAADB)]({{< relref "/operate/kubernetes/active-active/create-reaadb" >}}), which provides detailed instructions for preparing clusters, creating RERC resources, and deploying REAADB configurations.
5757

5858
## Related documentation
5959

60-
- [Active-Active database guide]({{< relref "/operate/kubernetes/active-active/create-reaadb" >}})
60+
- [Create Active-Active database (REAADB)]({{< relref "/operate/kubernetes/active-active/create-reaadb" >}})
6161
- [REAADB API reference]({{< relref "/operate/kubernetes/reference/redis_enterprise_active_active_database_api" >}})
6262
- [RERC API reference]({{< relref "/operate/kubernetes/reference/redis_enterprise_remote_cluster_api" >}})
6363
- [Networking configuration]({{< relref "/operate/kubernetes/networking" >}})

0 commit comments

Comments
 (0)