frontend-deployment.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. apiVersion: extensions/v1beta1
  2. kind: Deployment
  3. metadata:
  4. name: frontend
  5. # these labels can be applied automatically
  6. # from the labels in the pod template if not set
  7. # labels:
  8. # app: guestbook
  9. # tier: frontend
  10. spec:
  11. # this replicas value is default
  12. # modify it according to your case
  13. replicas: 3
  14. # selector can be applied automatically
  15. # from the labels in the pod template if not set
  16. # selector:
  17. # matchLabels:
  18. # app: guestbook
  19. # tier: frontend
  20. template:
  21. metadata:
  22. labels:
  23. app: guestbook
  24. tier: frontend
  25. spec:
  26. containers:
  27. - name: php-redis
  28. image: gcr.io/google-samples/gb-frontend:v4
  29. resources:
  30. requests:
  31. cpu: 100m
  32. memory: 100Mi
  33. env:
  34. - name: GET_HOSTS_FROM
  35. value: dns
  36. # If your cluster config does not include a dns service, then to
  37. # instead access environment variables to find service host
  38. # info, comment out the 'value: dns' line above, and uncomment the
  39. # line below.
  40. # value: env
  41. ports:
  42. - containerPort: 80