redis-master-deployment.yaml 624 B

123456789101112131415161718192021222324252627
  1. apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
  2. kind: Deployment
  3. metadata:
  4. name: redis-master
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: redis
  9. role: master
  10. tier: backend
  11. replicas: 1
  12. template:
  13. metadata:
  14. labels:
  15. app: redis
  16. role: master
  17. tier: backend
  18. spec:
  19. containers:
  20. - name: master
  21. image: k8s.gcr.io/redis:e2e # or just image: redis
  22. resources:
  23. requests:
  24. cpu: 100m
  25. memory: 100Mi
  26. ports:
  27. - containerPort: 6379