memcached
by [riftbit]
Chart for Memcached
About this chart
Memcached
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.
TL;DR
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/memcached
Introduction
This chart bootstraps a Memcached deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.
Prerequisites
- Kubernetes 1.12+
- Helm 3.1.0
Installing the Chart
To install the chart with the release name my-release:
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/memcached
These commands deploy Memcached on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
nameOverride | String to partially override common.names.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override common.names.fullname template | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
clusterDomain | Default Kubernetes cluster domain | cluster.local |
extraDeploy | Array of extra objects to deploy with the release | [] |
Memcached parameters
| Name | Description | Value |
|---|---|---|
image.registry | Memcached image registry | docker.io |
image.repository | Memcached image repository | bitnami/memcached |
image.tag | Memcached image tag (immutable tags are recommended) | 1.6.10-debian-10-r59 |
image.pullPolicy | Memcached image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] |
image.debug | Enable image debug mode | false |
architecture | Memcached architecture. Allowed values: standalone or high-availability | standalone |
hostAliases | Add deployment host aliases | [] |
memcachedUsername | Memcached admin user | "" |
memcachedPassword | Memcached admin password | "" |
replicaCount | Number of containers | 1 |
command | Default container command (useful when using custom images) | [] |
arguments | Default container args (useful when using custom images) | ["/run.sh"] |
extraEnv | Additional env vars to pass | [] |
podDisruptionBudget.create | Specifies whether a Pod disruption budget should be created | false |
podDisruptionBudget.minAvailable | Minimum number of pods that need to be available | "" |
podDisruptionBudget.maxUnavailable | Maximum number of pods that can be unavailable | 1 |
service.type | Kubernetes service type for Memcached | ClusterIP |
service.port | Memcached service port | 11211 |
service.nodePort | Kubernetes Service nodePort | "" |
service.loadBalancerIP | loadBalancerIP if service type is LoadBalancer | "" |
service.annotations | Additional annotations for Memcached service | {} |
autoscaling.enabled | Enable memcached statefulset autoscaling (requires architecture: "high-availability") | false |
autoscaling.minReplicas | memcached statefulset autoscaling minimum number of replicas | 3 |
autoscaling.maxReplicas | memcached statefulset autoscaling maximum number of replicas | 6 |
autoscaling.targetCPU | memcached statefulset autoscaling target CPU percentage | 50 |
autoscaling.targetMemory | memcached statefulset autoscaling target CPU memory | 50 |
resources.limits | CPU/Memory resource limits | {} |
resources.requests | CPU/Memory resource requests | {} |
portName | Name of the main port exposed by memcached | memcache |
securityContext.enabled | Enable security context | true |
securityContext.fsGroup | Group ID for the container | 1001 |
securityContext.runAsUser | User ID for the container | 1001 |
securityContext.readOnlyRootFilesystem | Enable read-only filesystem | false |
podLabels | Pod extra labels | {} |
podAnnotations | Pod annotations | {} |
podAffinityPreset | Pod affinity preset. Ignored if affinity is set. Allowed values: soft or hard | "" |
podAntiAffinityPreset | Pod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hard | soft |
nodeAffinityPreset.type | Node affinity preset type. Ignored if affinity is set. Allowed values: soft or hard | "" |
nodeAffinityPreset.key | Node label key to match. Ignored if affinity is set. | "" |
nodeAffinityPreset.values | Node label values to match. Ignored if affinity is set. | [] |
affinity | Affinity for pod assignment | {} |
nodeSelector | Node labels for pod assignment | {} |
tolerations | Tolerations for pod assignment | [] |
topologySpreadConstraints | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains | {} |
priorityClassName | Pod priority | "" |
initContainers | Add additional init containers to the Memcached pod | [] |
sidecars | Add additional sidecar containers to the Memcached pod | [] |
serviceAccount.create | Enable creation of ServiceAccount for memcached pods | true |
serviceAccount.name | The name of the ServiceAccount to use. | "" |
serviceAccount.automountServiceAccountToken | Enable/disable auto mounting of the service account token | true |
persistence.enabled | Enable persistence using PVC (Requires architecture: "high-availability") | false |
persistence.storageClass | PVC Storage Class for Memcached volume | "" |
persistence.annotations | Persistent Volume Claim annotations | {} |
persistence.accessModes | Persistent Volume Access Mode | ["ReadWriteOnce"] |
persistence.size | PVC Storage Request for Memcached volume | 8Gi |
metrics.enabled | Start a side-car prometheus exporter | false |
metrics.image.registry | Memcached exporter image registry | docker.io |
metrics.image.repository |
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 v5.15.2 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