apiVersion: v1
kind: Service
metadata:
  name: memcached
  labels:
    app: staffjoy
    tier: backend
spec:
  type: LoadBalancer
  ports:
    - port: 11211
      targetPort: 11211
      protocol: TCP
  selector:
    app: staffjoy
    tier: backend

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: memcached
  labels:
    app: staffjoy
    tier: backend
spec:
  replicas: 2
  template:
    metadata:
      labels:
        app: staffjoy
        tier: backend
    spec:
      containers:
      - name: memcached
        image: memcached
        ports:
        - containerPort: 11211
          name: memcached
