apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  namespace: guestbook
spec:
  selector:
    matchLabels:
      app: guestbook
      tier: frontend
  replicas: 3
  template:
    metadata:
      labels:
        app: guestbook
        tier: frontend
    spec:
      containers:
      - name: php-redis
        image: docker.io/ibmcom/guestbook:v1
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        env:
        - name: GET_HOSTS_FROM
          value: env
        - name: REDIS_MASTER_SERVICE_HOST
          value: redis-master.guestbook.svc.clusterset.local
        - name: REDIS_MASTER_SERVICE_PORT
          value: "6379"
        - name: REDIS_MASTER_SERVICE_PASSWORD
          value: test
        ports:
        - containerPort: 3000
