-
Notifications
You must be signed in to change notification settings - Fork 240
K8s: Add YAML examples #1872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+6,455
−487
Merged
K8s: Add YAML examples #1872
Changes from 16 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
f64f63f
Add comprehensive YAML examples subsection for Kubernetes reference d…
kaitlynmichael 847ed14
Fix navigation order in logs section
kaitlynmichael 9b4d5e9
Add links to YAML examples in log collector documentation
kaitlynmichael 0d8da15
Remove unnecessary 'File:' labels from YAML examples
kaitlynmichael 2443841
Move log collector changes to DOC-5485 branch
kaitlynmichael 5c369ef
edits
kaitlynmichael 6f9c84d
Add log-collector-rbac.md with RBAC configurations
kaitlynmichael 9683c0e
api section
kaitlynmichael acbfaf1
copy edits
kaitlynmichael 37caa05
download button
kaitlynmichael f7daf5c
deployment links
kaitlynmichael 3d1f5c5
copy edits
kaitlynmichael ba19a2f
fix download button
kaitlynmichael 7a262d6
download button adjustments
kaitlynmichael a538390
formatting cleanup
kaitlynmichael 793f6d4
active voice edits
kaitlynmichael e1e97fd
Update content/operate/kubernetes/reference/_index.md
kaitlynmichael 0bc65c4
Update content/operate/kubernetes/reference/yaml/_index.md
kaitlynmichael 9e6e393
Update content/operate/kubernetes/reference/yaml/active-active.md
kaitlynmichael 8c0d1ff
Update content/operate/kubernetes/reference/api/_index.md
kaitlynmichael 127e506
fix relrefs to yaml folder
kaitlynmichael 78c68bf
update api relrefs
kaitlynmichael 3c83384
Update content/operate/kubernetes/reference/yaml/rack-awareness.md
kaitlynmichael f22ba58
formatting all and restricted as code
kaitlynmichael 14e361c
add role binding config info
kaitlynmichael 1ce48c4
avoid passive voice
kaitlynmichael 4b840b1
review edits
kaitlynmichael 09560a6
remove duplicate log rbac page
kaitlynmichael 542c463
review edits
kaitlynmichael 8ee1637
RC: Remove retention policy requirement and implement tabs for Import…
cmilesb ff42138
K8s: Add log collector options (#1873)
kaitlynmichael c228477
k8s: fixing 404 errors between versions (#1870)
kaitlynmichael a718fb1
Quick .gitignore update (#1877)
dwdougherty 8e10e9a
DEV: add RESP2/3 return information to the RQE commands (#1874)
dwdougherty c173698
Remove retention policy
cmilesb 63ff3e8
DOC-5498 updated command line info
andy-stark-redis 1b363a4
DOC-5498 updates to config details
andy-stark-redis 232248a
Update content/integrate/redis-mcp/client-conf.md
andy-stark-redis 7caebd0
Update maxlength for redis copilot input box (#1879)
paoloredis 4335ef7
DOC-5501 Python prob examples
andy-stark-redis b2bb14a
DOC-5501 C# prob examples
andy-stark-redis 30ff0f1
DOC-5501 C# trans/pipe examples
andy-stark-redis d4c6dc6
DOC-5501 Jedis prob examples
andy-stark-redis e2251e8
DEV: add RESP2/3 return information to the JSON commands (#1878)
dwdougherty a28321d
DEV: a better explanation for the XCLAIM RETRYCOUNT option (#1883)
dwdougherty ef14a9d
Upload versioned products to different paths for cloud connector (#1888)
paoloredis d2f00b5
Update rs-prometheus-metrics-v2.md (#1890)
maayanagranat 58d3507
DOC-5503 David's local examples build
andy-stark-redis 3c1d721
DOC-5503 New param to override default tab name
andy-stark-redis d4bfda2
DOC-5503 allow custom name and link for first tab
andy-stark-redis 69900ec
DOC-5503 hide GitHub icon when example is local
andy-stark-redis c0141e9
DOC-5503 deleted test files
andy-stark-redis f9c4fe2
DOC-5510 added temporary data type examples
andy-stark-redis d16e8b2
DOC-5510 local C# client-specific examples
andy-stark-redis 2518df3
DOC-5510 Python and Jedis probabilistic examples
andy-stark-redis 74c86c2
Update rs-prometheus-metrics-v2.md (#1887)
maayanagranat b5ff4b7
DOC-3222 RS: Clarified formula and examples for disk sizing for heavy…
rrelledge edab195
RS 7.22.0 July maintenance release notes (#1844)
rrelledge 1f7674b
remove link to downloads page
mich-elle-luna 594e8b5
Update apt.md
mich-elle-luna 35be4c7
Add 8 new notebook links to AI notebook collection
mich-elle-luna b983e61
Update content/develop/ai/notebook-collection.md
mich-elle-luna 5c1c419
Update content/develop/ai/notebook-collection.md
mich-elle-luna fd3b087
Update content/develop/ai/notebook-collection.md
mich-elle-luna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
--- | ||
Title: Log collector RBAC examples | ||
alwaysopen: false | ||
categories: | ||
- docs | ||
- operate | ||
- kubernetes | ||
description: YAML examples for configuring RBAC permissions for the Redis Enterprise log collector tool in restricted and all modes. | ||
linkTitle: Log collector RBAC | ||
weight: 50 | ||
--- | ||
|
||
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. | ||
|
||
For complete log collection instructions, see [Collect logs]({{< relref "/operate/kubernetes/logs/collect-logs" >}}). | ||
|
||
## Prerequisites | ||
|
||
- [Deployment]({{< relref "/operate/kubernetes/deployment" >}}) must be installed | ||
- Appropriate permissions to create RBAC resources in target namespaces | ||
- Understanding of your deployment model (single namespace, multi-namespace, etc.) | ||
|
||
## Collection modes | ||
|
||
The log collector has two collection modes that require different RBAC permissions: | ||
|
||
- **Restricted mode** (recommended): Collects only Redis Enterprise resources with minimal security exposure. Default for versions 6.2.18-3 and later. | ||
- **All mode**: Collects comprehensive cluster information including nodes, storage classes, and operator resources. Use when specifically requested by Redis Support. | ||
|
||
## Restricted mode | ||
|
||
The restricted mode configuration provides minimal permissions for collecting Redis Enterprise resources only. | ||
|
||
{{<embed-yaml "k8s/log_collector_role_restricted_mode.md" "log-collector-restricted-rbac.yaml">}} | ||
|
||
Restricted mode configuration: | ||
- `Role`: Namespace-scoped permissions for Redis Enterprise resources | ||
- `ClusterRole`: Cluster-wide permissions for CRDs and basic cluster resources | ||
- `rules`: Minimal permissions for Redis Enterprise diagnostics | ||
|
||
Key permissions: | ||
- `pods, pods/log, pods/exec`: Access to pod information and logs | ||
- `app.redislabs.com/*`: All Redis Enterprise custom resources | ||
- `persistentvolumes`: Storage information for troubleshooting | ||
|
||
## All mode | ||
|
||
The all mode configuration provides comprehensive permissions for collecting detailed cluster information. | ||
|
||
{{<embed-yaml "k8s/log_collector_role_all_mode.md" "log-collector-all-rbac.yaml">}} | ||
|
||
All mode configuration: | ||
- `Role`: Extended namespace permissions including operator resources | ||
- `ClusterRole`: Additional cluster-wide permissions for nodes and storage | ||
- `rules`: Comprehensive permissions for full cluster diagnostics | ||
|
||
Additional permissions in all mode: | ||
- `nodes`: Node information and status | ||
- `storageclasses, volumeattachments`: Storage system details | ||
- `operators.coreos.com/*`: OpenShift operator information | ||
- `networking.istio.io/*`: Istio service mesh resources | ||
|
||
## Apply the configuration | ||
|
||
### Manual deployment | ||
kaitlynmichael marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
To apply the RBAC configurations manually: | ||
|
||
```bash | ||
# Apply restricted mode RBAC | ||
kubectl apply -f log-collector-restricted-rbac.yaml --namespace <namespace> | ||
|
||
# Apply all mode RBAC | ||
kubectl apply -f log-collector-all-rbac.yaml --namespace <namespace> | ||
``` | ||
### Namespace requirements | ||
|
||
The Role and RoleBinding must be created in every namespace where you need to collect logs: | ||
kaitlynmichael marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- **Single namespace**: Apply to the namespace where Redis Enterprise runs | ||
- **Multi-namespace with single REC**: Apply to the REC namespace plus each REDB namespace | ||
- **Multi-namespace with multiple RECs**: Apply to each REC namespace | ||
|
||
The ClusterRole and ClusterRoleBinding need to be created only once per cluster. | ||
|
||
Edit the values in the downloaded YAML file for your specific setup, updating the namespace references and role binding subjects to match your environment. | ||
|
||
## Security considerations | ||
|
||
### Best practices | ||
|
||
- Use restricted mode unless you specifically need additional cluster information | ||
- Limit namespace access to only where log collection is needed | ||
- Handle collected data according to your organization's security policies | ||
|
||
### Secrets permission explanation | ||
|
||
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: | ||
|
||
- The log collector uses Helm commands (`helm list`, `helm get all`) to gather Redis Enterprise Helm chart deployment information | ||
- Helm stores its deployment metadata in Kubernetes secrets | ||
- This metadata contains only deployment configuration (not sensitive data) | ||
|
||
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. | ||
|
||
## Troubleshooting | ||
|
||
### Permission errors | ||
|
||
- Verify that roles and bindings are applied correctly in the target namespaces | ||
- Check that the ClusterRole is applied cluster-wide | ||
- Ensure the service account has proper role bindings | ||
|
||
### Missing resources | ||
|
||
- Consider switching to all mode if additional cluster resources are needed | ||
- Verify that custom resource definitions are installed | ||
- Check that the operator has proper permissions | ||
|
||
## Next steps | ||
|
||
- [Collect logs]({{< relref "/operate/kubernetes/logs/collect-logs" >}}) | ||
|
||
## Related documentation | ||
|
||
- [Kubernetes RBAC documentation](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) | ||
- [Logs]({{< relref "/operate/kubernetes/logs" >}}) | ||
- [Deployment]({{< relref "/operate/kubernetes/deployment" >}}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: API reference | ||
categories: | ||
- docs | ||
- operate | ||
- kubernetes | ||
linkTitle: API reference | ||
description: Reference documentation for Redis Enterprise operator APIs | ||
weight: 30 | ||
alwaysopen: false | ||
hideListLinks: true | ||
aliases: | ||
--- | ||
|
||
The Redis Enterprise operator provides Kubernetes custom resource definitions (CRDs) that let you manage Redis Enterprise clusters and databases declaratively. This section contains the complete API reference for all operator resources. | ||
|
||
## API versions and stability | ||
|
||
The operator uses different API versions to indicate stability and feature maturity: | ||
|
||
- **`app.redislabs.com/v1`** - Stable APIs for production use | ||
- **`app.redislabs.com/v1alpha1`** - Alpha APIs that may change in future releases | ||
|
||
## Custom resources | ||
|
||
| Resource | API Version | Purpose | | ||
|----------|-------------|---------| | ||
| [RedisEnterpriseCluster (REC)](redis_enterprise_cluster_api) | `v1` | Manages Redis Enterprise cluster deployments | | ||
| [RedisEnterpriseDatabase (REDB)](redis_enterprise_database_api) | `v1alpha1` | Creates and configures Redis databases | | ||
| [RedisEnterpriseActiveActiveDatabase (REAADB)](redis_enterprise_active_active_database_api) | `v1alpha1` | Sets up active-active databases across clusters | | ||
| [RedisEnterpriseRemoteCluster (RERC)](redis_enterprise_remote_cluster_api) | `v1alpha1` | Defines remote cluster connections for active-active | | ||
|
||
## Working with the APIs | ||
|
||
### Using kubectl | ||
|
||
Manage all resources using standard `kubectl` commands: | ||
|
||
```bash | ||
# List all Redis Enterprise clusters | ||
kubectl get rec | ||
|
||
# Get detailed information about a specific database | ||
kubectl describe redb my-database | ||
|
||
# Apply a configuration from a YAML file | ||
kubectl apply -f my-redis-config.yaml | ||
``` | ||
|
||
### Resource relationships | ||
|
||
- Create a `RedisEnterpriseCluster` (REC) first to provide the Redis Enterprise infrastructure | ||
- Create `RedisEnterpriseDatabase` (REDB) resources within a cluster to provision individual databases | ||
- Use `RedisEnterpriseActiveActiveDatabase` (REAADB) with `RedisEnterpriseRemoteCluster (RERC)` resources to define participating clusters | ||
|
||
For complete YAML configuration examples, see the [YAML examples](../yaml/) section. | ||
kaitlynmichael marked this conversation as resolved.
Show resolved
Hide resolved
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.