Skip to content

K8s Memcached

udx-github edited this page Jul 3, 2026 · 3 revisions

Deploys a Memcached instance via the Bitnami Helm chart into a Kubernetes namespace.

Use this module when a Rabbit service needs an in-cluster Memcached instance for application-level caching (such as WordPress object caching).

Supported Features

  • Memcached deployment via the Bitnami Helm chart from Docker Hub OCI registry.
  • Configurable replica count.
  • Service type and port configuration.
  • PodDisruptionBudget creation.
  • Resource requests and limits.
  • Pod anti-affinity presets.
  • Atomic and wait-for-ready deployment.
  • DockerHub OCI authentication for chart pulls.

Prerequisites

  • A kubeconfig secret created by the k8s-access module.
  • The target namespace must exist.
  • DockerHub credentials when requirements.dockerhub_oci_auth is true.

Important Notes

  • The Helm chart is pulled from oci://registry-1.docker.io/bitnamicharts/memcached.
  • The service account is not created by the chart; it uses <namespace>-sa created by k8s-access.
  • Network policies are disabled by default.
  • atomic: true ensures rollback on deployment failure.

Minimal Example

services:
  - name: "k8s Memcached"
    module: "k8s-memcached"
    id: "memcached"
    deployment_order: 102
    requirements:
      dockerhub_oci_auth: true
    configurations:
      namespace: "www-example-com"
      name: "example-memcached"

Outputs

Output Description
memcached_port The Memcached service port (always 11211).

Full Configuration Schema

The fields below are public module inputs under configurations.

configurations:
  namespace: "memcached"
  name: "default-memcached"
  chart_version: "8.2.2"
  replica_count: 1
  service_type: "ClusterIP"
  port: 11211
  create_pdb: true
  min_available: 0
  podAntiAffinityPreset: "soft"
  resources:
    requests:
      cpu: "50m"
      memory: "128Mi"
    limits:
      cpu: "200m"
      memory: "256Mi"
  wait: true
  atomic: true
  cleanup_on_fail: true
  timeout: 600
  image:
    tag: "latest"
  secret_labels:
    creator: "automation"
    r2a_module: "k8s-memcached"
Field Type Required Description
namespace string Yes Kubernetes namespace.
name string Yes Helm release and Memcached instance name.
chart_version string No Bitnami Memcached Helm chart version. Defaults to 8.2.2.
replica_count number No Number of Memcached replicas. Defaults to 1.
service_type string No Kubernetes service type. Defaults to ClusterIP.
port number No Memcached service port. Defaults to 11211.
create_pdb boolean No Creates a PodDisruptionBudget. Defaults to true.
min_available number No Minimum available pods for the PDB. Defaults to 0.
podAntiAffinityPreset string No Pod anti-affinity preset: soft or hard. Defaults to soft.
resources object No Resource requests and limits.
resources.requests.cpu string No CPU request. Defaults to 50m.
resources.requests.memory string No Memory request. Defaults to 128Mi.
resources.limits.cpu string No CPU limit. Defaults to 200m.
resources.limits.memory string No Memory limit. Defaults to 256Mi.
wait boolean No Waits for resources to be ready. Defaults to true.
atomic boolean No Rolls back on failure. Defaults to true.
cleanup_on_fail boolean No Cleans up on failure. Defaults to true.
timeout number No Helm operation timeout in seconds. Defaults to 600.
image.tag string No Memcached image tag. Defaults to latest.
secret_labels map[string] No Labels for associated secrets.

Clone this wiki locally