yurake/k8s-3tier-webapp

View on GitHub
kubernetes/memcached/memcached-deployment.yaml

Summary

Maintainability
Test Coverage
apiVersion: apps/v1
kind: Deployment
metadata:
  name: memcached
spec:
  selector:
    matchLabels:
      app: memcached
  replicas: 1
  template:
    metadata:
      labels:
        tier: backend
        component: cache
        app: memcached
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9150"
    spec:
      containers:
        - name: memcached
          image: memcached:1.6
          imagePullPolicy: Always
          ports:
            - containerPort: 11211
          livenessProbe:
            tcpSocket:
              port: 11211
          readinessProbe:
            tcpSocket:
              port: 11211
        - name: memcached-exporter
          image: prom/memcached-exporter:v0.14.4
          ports:
            - containerPort: 9150
          livenessProbe:
            tcpSocket:
              port: 9150
          readinessProbe:
            tcpSocket:
              port: 9150