-
Notifications
You must be signed in to change notification settings - Fork 232
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
base: main
Are you sure you want to change the base?
K8s: Add YAML examples #1872
Conversation
…ocumentation - Created new YAML examples subsection in content/operate/kubernetes/reference/yaml-examples/ - Added 4 dedicated example pages for different deployment scenarios: * basic-deployment.md - Essential YAML files for simple Redis Enterprise deployment * rack-awareness.md - YAML examples for rack-aware deployments across availability zones * active-active.md - YAML examples for Active-Active databases across multiple clusters * multi-namespace.md - YAML examples for deploying across multiple namespaces - Added log-collector-rbac.md to logs section with RBAC configurations for restricted and all collection modes - Each YAML example is in its own linkable subsection for direct referencing - Updated reference index to include new YAML examples subsection - Updated logs index to include log collector RBAC documentation - All pages include complete YAML examples using existing embed files from content/embeds/k8s/ - Provides step-by-step instructions, configuration explanations, and troubleshooting guidance - Cross-referenced with relevant API documentation and guides
- Updated log collector RBAC page weight from 20 to 90 - Ensures 'Collect logs' (weight 89) appears before 'Log collector RBAC' (weight 90) in navigation
- Link 'restricted' mode to #restricted-mode-rbac section - Link 'all' mode to #all-mode-rbac section - Add RBAC requirements section with link to complete YAML configurations - Improves navigation between log collection guide and RBAC setup
- Removed 'File: filename.yaml' labels from all YAML examples across all pages - YAML examples are self-explanatory and don't need explicit file labels - Fixed duplicate 'Customization options' headings in basic-deployment.md - Renamed to 'Cluster customization options' and 'Database customization options' - Cleaner, more focused presentation of YAML configurations
- Removed log collector RBAC page from YAML examples section - Reverted logs section index to remove log collector RBAC reference - Reverted collect-logs.md to remove links to log collector RBAC page - DOC-4727 now focuses purely on YAML examples for deployment scenarios - Log collector documentation moved to DOC-5485 branch where it belongs thematically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a few suggestions, but the main text is basically really good. However, there are quite a few broken links that you should fix and check.
Regarding the embed-yaml
shortcode, Cameron added something very similar recently (scrollable-code
which is used, for example here). It might be better to use scrollable-code
or modify it, unless you have further yaml-specific ideas for your shortcode.
``` | ||
### Namespace requirements | ||
|
||
The Role and RoleBinding must be created in every namespace where you need to collect logs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"You must create" to avoid PV?
|
||
## All mode | ||
|
||
The all mode configuration provides comprehensive permissions for collecting detailed cluster information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing major, but I'm just wondering if there's an easy way to add italics or code style or something to "all" when it's used as the mode name (and I guess you would do the same for "restricted" for consistency)? For example, later in the page you say "Consider switching to all mode..." and it took me a second reading to get what it meant.
|
||
**Important:** Always delete databases (REDB) before deleting the cluster (REC) to ensure proper cleanup. | ||
- [Basic deployment]({{< relref "/operate/kubernetes/reference/yaml-examples/basic-deployment" >}}) - Essential YAML files for simple Redis Enterprise deployment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all dead links. I think the /yaml-examples/
bit should be just /yaml/
, unless you're planning to rename the folder in a future commit?
- [Basic deployment]({{< relref "/operate/kubernetes/reference/yaml-examples/basic-deployment" >}}) - Essential YAML files for simple Redis Enterprise deployment | |
- [Basic deployment]({{< relref "/operate/kubernetes/reference/yaml/basic-deployment" >}}) - Essential YAML files for simple Redis Enterprise deployment |
- 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a relref.
For complete YAML configuration examples, see the [YAML examples](../yaml/) section. | |
For complete YAML configuration examples, see the [YAML examples]({{< relref "/operate/kubernetes/reference/yaml/" >}}) section. |
weight: 85 | ||
--- | ||
|
||
This section provides complete YAML examples for common Redis Enterprise for Kubernetes deployment scenarios. Each example includes the necessary configuration files and step-by-step instructions for editing and applying them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first "for" reacts badly with the one in the product name.
This section provides complete YAML examples for common Redis Enterprise for Kubernetes deployment scenarios. Each example includes the necessary configuration files and step-by-step instructions for editing and applying them. | |
This section provides complete YAML examples that cover common Redis Enterprise for Kubernetes deployment scenarios. Each example includes the necessary configuration files and step-by-step instructions for editing and applying them. |
weight: 20 | ||
--- | ||
|
||
This page provides YAML examples for deploying Redis Enterprise with [rack awareness]({{< relref "/operate/kubernetes/architecture/operator-architecture#rack-awareness" >}}). Rack awareness distributes Redis Enterprise nodes across different availability zones or failure domains to improve high availability and fault tolerance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead link (presumably, this page is yet to be added, but I thought I'd check).
|
||
## Service account | ||
|
||
The service account for rack-aware deployments is the same as [basic deployments]({{< relref "/operate/kubernetes/reference/yaml-examples/basic-deployment#service-account" >}}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service account for rack-aware deployments is the same as [basic deployments]({{< relref "/operate/kubernetes/reference/yaml-examples/basic-deployment#service-account" >}}). | |
The service account for rack-aware deployments is the same as for [basic deployments]({{< relref "/operate/kubernetes/reference/yaml-examples/basic-deployment#service-account" >}}). |
|
||
## Rack-aware Redis Enterprise cluster | ||
|
||
The rack-aware [REC configuration]({{< relref "/operate/kubernetes/reference/redis_enterprise_cluster_api" >}}) includes the `rackAwarenessNodeLabel` field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the new /api/
folder.
The rack-aware [REC configuration]({{< relref "/operate/kubernetes/reference/redis_enterprise_cluster_api" >}}) includes the `rackAwarenessNodeLabel` field. | |
The rack-aware [REC configuration]({{< relref "/operate/kubernetes/reference/api/redis_enterprise_cluster_api" >}}) includes the `rackAwarenessNodeLabel` field. |
|
||
## Redis Enterprise database | ||
|
||
Database configuration for rack-aware clusters is the same as [basic deployments]({{< relref "/operate/kubernetes/reference/yaml-examples/basic-deployment#redis-enterprise-database" >}}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Database configuration for rack-aware clusters is the same as [basic deployments]({{< relref "/operate/kubernetes/reference/yaml-examples/basic-deployment#redis-enterprise-database" >}}). | |
Database configuration for rack-aware clusters is the same as [basic deployments]({{< relref "/operate/kubernetes/reference/yaml/basic-deployment#redis-enterprise-database" >}}). |
|
||
## Next steps | ||
|
||
- [Configure Active-Active databases]({{< relref "/operate/kubernetes/reference/yaml-examples/active-active" >}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several dodgy links below, either using yaml-examples
instead of yaml
or missing the api
folder.
# Apply multiple files | ||
kubectl apply -f rbac/ -f cluster/ -f database/ | ||
|
||
# Apply with validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment might incorrectly imply that the previous apply
forms don't employ validation, and this one does, in addition to persistently applying the configuration in the manifest. The reality is kinda the opposite: all of these commands employ validation (both client- and server-side), and the last one only does client-side validation and doesn't actually apply the objects.
Hence, consider a comment in the likes of:
# Validate files without actually applying
|
||
## Best practices | ||
|
||
- Validate syntax: Use `kubectl apply --dry-run=client` to check YAML syntax before applying |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indeed checks YAML syntax, but goes beyond that: it also validates the YAML objects with the schema for that object kind.
|
||
This example shows: | ||
- Operator namespace: `redis-enterprise-operator` (where the operator runs) | ||
- Consumer namespaces: `app-production`, `app-staging` (where REC/REDB resources are created) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only REDBs are created in these separate namespaces; the REC lives in the operator's namespace.
weight: 20 | ||
--- | ||
|
||
This page provides YAML examples for deploying Redis Enterprise with [rack awareness]({{< relref "/operate/kubernetes/architecture/operator-architecture#rack-awareness" >}}). Rack awareness distributes Redis Enterprise nodes across different availability zones or failure domains to improve high availability and fault tolerance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page provides YAML examples for deploying Redis Enterprise with [rack awareness]({{< relref "/operate/kubernetes/architecture/operator-architecture#rack-awareness" >}}). Rack awareness distributes Redis Enterprise nodes across different availability zones or failure domains to improve high availability and fault tolerance. | |
This page provides YAML examples for deploying Redis Enterprise with [rack awareness]({{< relref "/operate/kubernetes/architecture/operator-architecture#rack-awareness" >}}). Rack awareness distributes Redis Enterprise nodes and database shards across different availability zones or failure domains to improve high availability and fault tolerance. |
May want to mention the effect on databases too, which I guess is the more important aspect for most users.
|
||
### Database shards not distributed | ||
- Confirm the cluster has rack awareness enabled | ||
- Check that the database has multiple shards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rack awareness feature in the cluster distributes primary/replica across zones, but not necessarily different (primary) shards. Perhaps the instruction here should be to check that the database has replication enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file duplicates the one in logs/log-collect-rbac.md
(though with minor diff's). I guess we should pick only one?
|
||
## Apply the configuration | ||
|
||
### Manual deployment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These instructions only mention the roles, but it could also be useful to clarify that these roles should be bound (via RoleBindings) to the user subject that will execute the log collector.
I've added a YAML examples section to the Reference section. These are pulled directly from the example files in the redis-enterprise-k8s-docs repo with each release, so they will always be up to date. Each YAML example can be copied or downloaded with the buttons in the top right corner. Longer files scroll to avoid taking up the entire page.
This PR includes a new shortcode: embed-yaml
DOC-3998
DOC-4725