frontend-controller.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. apiVersion: v1
  2. kind: ReplicationController
  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. # app: guestbook
  18. # tier: frontend
  19. template:
  20. metadata:
  21. labels:
  22. app: guestbook
  23. tier: frontend
  24. spec:
  25. containers:
  26. - name: php-redis
  27. image: gcr.io/google_samples/gb-frontend:v4
  28. resources:
  29. requests:
  30. cpu: 100m
  31. memory: 100Mi
  32. env:
  33. - name: GET_HOSTS_FROM
  34. value: dns
  35. # If your cluster config does not include a dns service, then to
  36. # instead access environment variables to find service host
  37. # info, comment out the 'value: dns' line above, and uncomment the
  38. # line below.
  39. # value: env
  40. ports:
  41. - containerPort: 80