frontend-deployment.yaml 943 B

123456789101112131415161718192021222324252627282930313233
  1. apiVersion: 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: frontend
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: guestbook
  9. tier: frontend
  10. replicas: 3
  11. template:
  12. metadata:
  13. labels:
  14. app: guestbook
  15. tier: frontend
  16. spec:
  17. containers:
  18. - name: php-redis
  19. image: gcr.io/google-samples/gb-frontend:v4
  20. resources:
  21. requests:
  22. cpu: 100m
  23. memory: 100Mi
  24. env:
  25. - name: GET_HOSTS_FROM
  26. value: dns
  27. # If your cluster config does not include a dns service, then to
  28. # instead access environment variables to find service host
  29. # info, comment out the 'value: dns' line above, and uncomment the
  30. # line below:
  31. # value: env
  32. ports:
  33. - containerPort: 80