frontend-controller.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. # Setting terminationGracePeriodSeconds to zero to delete pods immediately on delete request,
  26. # since in tests we usually check and expect the pods being deleted right after deletion.
  27. terminationGracePeriodSeconds: 0
  28. containers:
  29. - name: php-redis
  30. image: gcr.io/google_samples/gb-frontend:v4
  31. resources:
  32. requests:
  33. cpu: 100m
  34. memory: 100Mi
  35. env:
  36. - name: GET_HOSTS_FROM
  37. value: dns
  38. # If your cluster config does not include a dns service, then to
  39. # instead access environment variables to find service host
  40. # info, comment out the 'value: dns' line above, and uncomment the
  41. # line below.
  42. # value: env
  43. ports:
  44. - containerPort: 80