memcached
by CloudPirates
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
About this chart
Memcached
Memcached is a high-performance, distributed memory object caching system. It is an in-memory key-value store for small chunks of arbitrary data from results of database calls, API calls, or page rendering. This Helm chart deploys Memcached on Kubernetes with comprehensive configuration options for development and production environments.
Installing the Chart
To install the chart with the release name my-memcached:
helm install my-memcached oci://registry-1.docker.io/cloudpirates/memcached
To install with custom values:
helm install my-memcached oci://registry-1.docker.io/cloudpirates/memcached -f my-values.yaml
Or install directly from the local chart:
helm install my-valkey ./charts/valkey
Uninstalling the Chart
To uninstall/delete the my-memcached deployment:
helm uninstall my-memcached
This removes all the Kubernetes components associated with the chart and deletes the release.
Security & Signature Verification
This Helm chart is cryptographically signed with Cosign to ensure authenticity and prevent tampering.
Public Key:
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5U+rM2d3hDjgP5T3cLShuuQIU9vR
Z4/G+Nug6q5vRa+C3qUA1wXjbaJFAfcIrv5VjmYAYOj13shnPpp3Zh4fnQ==
-----END PUBLIC KEY-----
To verify the helm chart before installation, copy the public key to the file cosign.pub and run cosign:
cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/memcached:<version>
Configuration
The following table lists the configurable parameters of the Memcached chart and their default values.
Global Parameters
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker Image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
Common Parameters
| Parameter | Description | Default |
|---|---|---|
nameOverride | String to partially override memcached.fullname | "" |
fullnameOverride | String to fully override memcached.fullname | "" |
namespaceOverride | String to override the namespace for all resources | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
podAnnotations | Annotations to add to the pods created by the deployment | {} |
podLabels | Labels to add to the pods created by the deployment | {} |
Deployment Parameters
| Parameter | Description | Default |
|---|---|---|
replicaCount | Number of Memcached replicas to deploy | 1 |
revisionHistoryLimit | Number of revisions to keep in history for rollback | 10 |
deploymentType | Type of workload to deploy (Deployment or StatefulSet) | Deployment |
Memcached Image Parameters
| Parameter | Description | Default |
|---|---|---|
image.registry | Memcached image registry | docker.io |
image.repository | Memcached image repository | memcached |
image.tag | Memcached image tag (immutable tags are recommended) | "1.6.39@sha256:050de63e6c082df85f93ffed9c388004b3c6257a06f1904e8628a6f87658eb99" |
image.pullPolicy | Memcached image pull policy | Always |
image.pullSecrets | Memcached image pull secrets | [] |
Memcached Configuration Parameters
| Parameter | Description | Default |
|---|---|---|
config.memoryLimit | Maximum amount of memory to use for cache (MB) | 64 |
config.maxConnections | Maximum number of simultaneous connections | 1024 |
config.verbosity | Verbosity level (0-2) | 0 |
config.extraArgs | Additional command-line arguments | [] |
Service Parameters
| Parameter | Description | Default |
|---|---|---|
service.type | Memcached service type | ClusterIP |
service.port | Memcached service port | 11211 |
service.nodePort | Node port for Memcached service | "" |
service.clusterIP | Static cluster IP or "None" for headless service | "" |
service.publishNotReadyAddresses | Publish pod DNS names before pods are ready (StatefulSet peer discovery) | false |
service.annotations | Additional custom annotations for Memcached service | {} |
Security Context Parameters
| Parameter | Description | Default |
|---|---|---|
podSecurityContext.enabled | Enabled Memcached pod Security Context | true |
podSecurityContext.fsGroup | Set Memcached pod's Security Context fsGroup | 11211 |
containerSecurityContext.runAsUser | Set Memcached container's Security Context runAsUser | 11211 |
containerSecurityContext.runAsNonRoot | Set Memcached container's Security Context runAsNonRoot | true |
containerSecurityContext.allowPrivilegeEscalation | Set Memcached container's privilege escalation | false |
priorityClassName | Priority class for the memcached instance | "" |
Resources Parameters
| Parameter | Description | Default |
|---|---|---|
resources | Resource limits and requests for Memcached pod | {} |
Health Check Parameters
| Parameter | Description | Default |
|---|---|---|
livenessProbe.enabled | Enable livenessProbe on Memcached containers | true |
livenessProbe.initialDelaySeconds | Initial delay seconds for livenessProbe | 30 |
livenessProbe.periodSeconds | Period seconds for livenessProbe | 10 |
livenessProbe.timeoutSeconds | Timeout seconds for livenessProbe | 5 |
livenessProbe.failureThreshold | Failure threshold for livenessProbe | 3 |
livenessProbe.successThreshold | Success threshold for livenessProbe | 1 |
readinessProbe.enabled | Enable readinessProbe on Memcached containers | true |
readinessProbe.initialDelaySeconds | Initial delay seconds for readinessProbe | 5 |
readinessProbe.periodSeconds | Period seconds for readinessProbe | 5 |
readinessProbe.timeoutSeconds | Timeout seconds for readinessProbe | 5 |
readinessProbe.failureThreshold | Failure threshold for readinessProbe | 3 |
readinessProbe.successThreshold | Success threshold for readinessProbe | 1 |
Service Account Parameters
| Parameter | Description | Default |
|---|---|---|
serviceAccount.create | Specifies whether a service account should be created | true |
serviceAccount.annotations | Annotations to add to the service account | {} |
serviceAccount.name | The name of the service account to use | "" |
serviceAccount.automountServiceAccountToken | Automatically mount service account token | false |
ConfigMap Parameters
| Parameter | Description | Default |
|---|---|---|
configMap.create | Create a ConfigMap for Memcached configuration | false |
configMap.data | ConfigMap data | {} |
Ingress Parameters
| Parameter | Description | Default |
|---|---|---|
ingress.enabled | Enable ingress record generation for Memcached | false |
ingress.className | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | "" |
ingress.annotations | Additional annotations for the Ingress resource | {} |
ingress.hosts | An array with hosts and paths | [{"host": "memcached.local", "paths": [{"path": "/", "pathType": "ImplementationSpecific"}]}] |
ingress.tls | TLS configuration for the Ingress | [] |
Pod Disruption Budget Parameters
| Parameter | Description | Default |
|---|---|---|
pdb.create | Enable/disable a Pod Disruption Budget creation | false |
pdb.minAvailable | Minimum number/percentage of pods that should remain scheduled | "" |
pdb.maxUnavailable | Maximum number/percentage of pods that may be made unavailable | "" |
Extra Configuration Parameters
| Parameter | Description | Default |
|---|---|---|
extraEnvVars | Additional environment variables to set | [] |
extraVolumes | A list of additional existing volumes that will be mounted into the container | [] |
extraVolumeMounts | A list of additional existing volume mounts that will be mounted into the container | [] |
extraObjects | A list of additional Kubernetes objects to deploy alongside the release | [] |
Extra Objects
You can use the extraObjects array to deploy additional Kubernetes resources (such as NetworkPolicies, ConfigMaps, etc.) alongside the release. This is useful for customizing your deployment with extra manifests that are not covered by the default chart options.
Helm templating is supported in any field, but all template expressions must be quoted. For example, to use the release namespace, write namespace: "{{ .Release.Namespace }}".
Example: Deploy a NetworkPolicy with templating
extraObjects:
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-dns
namespace: "{{ .Release.Namespace }}"
spec:
podSelector: {}
policyTypes:
- Egress
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
All objects in extraObjects will be rendered and deployed with the release. You can use any valid Kubernetes manifest, and reference Helm values or built-in ob
Deploy memcached with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has memcached on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmemcached is pinned at v0.14.14 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply