Helm chartv0.4.0App 0.40.0Verified publisher

Mcrouter is a memcached protocol router for scaling memcached deployments.

About this chart

Mcrouter Helm Chart

Helm chart for Mcrouter, a Memcached protocol router for scaling memcached deployments.

Configuration

The following table lists the configurable parameters of the Mcrouter chart and their default values.

ParameterDescriptionDefault
controllerController used for deploying the Mcrouter pods. Possible values: daemonset or statefulsetdaemonset
daemonset.hostPortHost port used by the DaemonSet controller5000
imageContainer's imagejphalip/mcrouter:0.36.0Note: Third-party image (see source)It is recommended to build a new, up-to-date image based on the official Dockerfile
mcrouterCommandParams.configThe config file to use for the mcrouter command. If not provided, then a config file will automatically be generated based on the Memcached chart's parameters.No value
mcrouterCommandParams.portPort(s) to listen on (comma separated)5000
memcached.enabledIf true, the Memcached chart will be installed as a dependencytrue
resources.limits.cpuCPU resource limits256m
resources.limits.memoryMemory resource limits512Mi
resources.requests.cpuCPU resource requests100m
resources.requests.memoryMemory resource requests128Mi
statefulset.antiAffinityPod anti-affinity logic used by the StatefulSet controller. Possible values: hard, softhard
statefulset.replicasNumber of pod replicas used by the StatefulSet controller1

Controllers

This chart allows the use of two different controllers: DaemonSet (default) and StatefulSet.

If using the DaemonSet controller then each Mcrouter pods will connect to a port on their respective node' host (defaults to 5000). Each of your application pods may then connect to the same port on their respective node. To access the node's name, you may expose that name via an environment variable with the spec.nodeName entry in your application's PodSpec as described in the Kubernetes documentation.

If using the StatefulSet controller then the service can be accessed by default on port 5000 on the following DNS name from within your cluster: <release name>-mcrouter.<namespace>.svc.cluster.local.

Testing

Install the Mcrouter chart:

helm install stable/mcrouter --name=myproxy

Connect to one of the Mcrouter pods and start a telnet session:

MCROUTER_POD_IP=$(kubectl get pods -l app=myproxy-mcrouter -o jsonpath="{.items[0].status.podIP}")

kubectl run -it --rm alpine --image=alpine --restart=Never telnet $MCROUTER_POD_IP 5000

In the telnet prompt enter the following commands:

set mykey 0 0 5

hello

get mykey

quit

Deploy mcrouter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mcrouter 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmcrouter is pinned at v0.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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