Skip to content

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

K8s: Add YAML examples #1872

wants to merge 16 commits into from

Conversation

kaitlynmichael
Copy link
Contributor

@kaitlynmichael kaitlynmichael commented Jul 24, 2025

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

…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
Copy link
Contributor

github-actions bot commented Jul 24, 2025

@kaitlynmichael kaitlynmichael requested review from oshribr, yuvallevy2, a team and shreyaverma-git and removed request for oshribr July 24, 2025 21:17
@kaitlynmichael kaitlynmichael marked this pull request as ready for review July 24, 2025 21:29
Copy link
Contributor

@andy-stark-redis andy-stark-redis left a 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:
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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?

Suggested change
- [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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a relref.

Suggested change
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.
Copy link
Contributor

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.

Suggested change
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.
Copy link
Contributor

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" >}}).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

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.

Suggested change
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" >}}).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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" >}})
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants