redis-slave-controller.yaml 805 B

12345678910111213141516171819202122232425262728293031323334
  1. apiVersion: v1
  2. kind: ReplicationController
  3. metadata:
  4. name: redis-slave
  5. labels:
  6. app: redis
  7. role: slave
  8. tier: backend
  9. spec:
  10. replicas: 2
  11. template:
  12. metadata:
  13. labels:
  14. app: redis
  15. role: slave
  16. tier: backend
  17. spec:
  18. containers:
  19. - name: slave
  20. image: redis:latest
  21. resources:
  22. requests:
  23. cpu: 100m
  24. memory: 100Mi
  25. env:
  26. - name: GET_HOSTS_FROM
  27. value: dns
  28. # If your cluster config does not include a dns service, then to
  29. # instead access an environment variable to find the master
  30. # service's host, comment out the 'value: dns' line above, and
  31. # uncomment the line below:
  32. # value: env
  33. ports:
  34. - containerPort: 6379