{
  "schema_version": 2,
  "id": "operate/kubernetes/reference/yaml",
  "title": "YAML examples",
  "url": "https://redis.io/docs/latest/operate/kubernetes/reference/yaml/",
  "summary": "Example YAML files for deploying Redis Enterprise on Kubernetes with different configurations.",
  "tags": [
    "docs",
    "operate",
    "kubernetes"
  ],
  "last_updated": "2026-09-28T15:03:12+01:00",
  "children": [
    {
      "id": "operate/kubernetes/reference/yaml/basic-deployment",
      "summary": "YAML examples for basic Redis Enterprise deployment including RBAC, cluster, and database configurations.",
      "title": "Basic deployment examples",
      "url": "https://redis.io/docs/latest/operate/kubernetes/reference/yaml/basic-deployment/"
    },
    {
      "id": "operate/kubernetes/reference/yaml/rack-awareness",
      "summary": "YAML examples for rack-aware Redis Enterprise deployments that distribute nodes across availability zones.",
      "title": "Rack awareness examples",
      "url": "https://redis.io/docs/latest/operate/kubernetes/reference/yaml/rack-awareness/"
    },
    {
      "id": "operate/kubernetes/reference/yaml/active-active",
      "summary": "YAML examples for Active-Active Redis Enterprise databases across multiple Kubernetes clusters.",
      "title": "Active-Active examples",
      "url": "https://redis.io/docs/latest/operate/kubernetes/reference/yaml/active-active/"
    },
    {
      "id": "operate/kubernetes/reference/yaml/multi-namespace",
      "summary": "YAML examples for deploying Redis Enterprise across multiple Kubernetes namespaces.",
      "title": "Multi-namespace examples",
      "url": "https://redis.io/docs/latest/operate/kubernetes/reference/yaml/multi-namespace/"
    },
    {
      "id": "operate/kubernetes/reference/yaml/log-collector-rbac",
      "summary": "YAML examples for configuring RBAC permissions for the Redis Enterprise log collector tool in `restricted` and `all` modes.",
      "title": "Log collector RBAC examples",
      "url": "https://redis.io/docs/latest/operate/kubernetes/reference/yaml/log-collector-rbac/"
    }
  ],
  "page_type": "content",
  "content_hash": "5381db374b37b09c23f18b8423cb5be3d4a06d35c685fcbd66320d63b173da66",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "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."
    },
    {
      "id": "how-to-use-these-examples",
      "title": "How to use these examples",
      "role": "content",
      "text": ""
    },
    {
      "id": "download-and-customize",
      "title": "Download and customize",
      "role": "content",
      "text": "1. Copy the YAML content from the examples below\n2. Save each YAML block to a separate file with a descriptive name\n3. Edit the configuration values to match your environment\n4. Apply the files in the correct order using `kubectl apply`"
    },
    {
      "id": "configuration-storage",
      "title": "Configuration storage",
      "role": "configuration",
      "text": "Redis Enterprise for Kubernetes stores configuration in several places:\n\n- Custom resources: Cluster and database specifications are stored as Kubernetes custom resources (REC, REDB, REAADB, RERC)\n- Secrets: Sensitive data like passwords and certificates are stored in Kubernetes secrets\n- ConfigMaps: Non-sensitive configuration data is stored in ConfigMaps\n- RBAC resources: Permissions are defined through Roles, ClusterRoles, and their bindings"
    },
    {
      "id": "applying-yaml-files",
      "title": "Applying YAML files",
      "role": "content",
      "text": "Apply YAML files using `kubectl apply`:\n\n[code example]"
    },
    {
      "id": "monitoring-deployment",
      "title": "Monitoring deployment",
      "role": "content",
      "text": "Check the status of your resources after applying:\n\n[code example]"
    },
    {
      "id": "example-categories",
      "title": "Example categories",
      "role": "example",
      "text": "- [Basic deployment examples](https://redis.io/docs/latest/operate/kubernetes/reference/yaml/basic-deployment) - Service account, RBAC, cluster, and database configurations\n- [Rack awareness examples](https://redis.io/docs/latest/operate/kubernetes/reference/yaml/rack-awareness) - Rack-aware cluster configuration and required RBAC\n- [Active-Active examples](https://redis.io/docs/latest/operate/kubernetes/reference/yaml/active-active) - Multi-cluster Active-Active database setup\n- [Multi-namespace examples](https://redis.io/docs/latest/operate/kubernetes/reference/yaml/multi-namespace) - Cross-namespace operator and cluster configurations\n- [Log collector RBAC examples](https://redis.io/docs/latest/operate/kubernetes/reference/yaml/log-collector-rbac) - RBAC permissions for log collection in restricted and all modes"
    },
    {
      "id": "best-practices",
      "title": "Best practices",
      "role": "content",
      "text": "- Validate configuration: Use `kubectl apply --dry-run=client` to validate YAML syntax and object schemas before applying\n- Version control: Store your customized YAML files in version control\n- Resource naming: Use consistent, descriptive names for all resources"
    },
    {
      "id": "related-documentation",
      "title": "Related documentation",
      "role": "related",
      "text": "- [Reference](https://redis.io/docs/latest/operate/kubernetes/reference) - Complete API specifications for all custom resources\n- [Deploy Redis Enterprise Software for Kubernetes](https://redis.io/docs/latest/operate/kubernetes/deployment/quick-start) - Step-by-step deployment instructions\n- [Manage databases in multiple namespaces](https://redis.io/docs/latest/operate/kubernetes/re-clusters/multi-namespace) - Detailed multi-namespace setup instructions\n- [Active-Active databases](https://redis.io/docs/latest/operate/kubernetes/active-active) - Active-Active configuration and management"
    }
  ],
  "examples": [
    {
      "id": "applying-yaml-files-ex0",
      "language": "bash",
      "code": "# Apply a single file\nkubectl apply -f my-config.yaml\n\n# Apply multiple files\nkubectl apply -f rbac/ -f cluster/ -f database/\n\n# Validate files without applying\nkubectl apply --dry-run=client -f my-config.yaml",
      "section_id": "applying-yaml-files"
    },
    {
      "id": "monitoring-deployment-ex0",
      "language": "bash",
      "code": "# Check operator deployment\nkubectl get deployment redis-enterprise-operator\n\n# Check cluster status\nkubectl get rec\nkubectl describe rec <cluster-name>\n\n# Check database status\nkubectl get redb\nkubectl describe redb <database-name>\n\n# View events for troubleshooting\nkubectl get events --sort-by=.metadata.creationTimestamp",
      "section_id": "monitoring-deployment"
    }
  ]
}
