Advertisement
QualibreInfo

redis-slave-deployment.yml

Jun 3rd, 2022
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.23 KB | None | 0 0
  1. apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
  2. kind: Deployment
  3. metadata:
  4.   name: redis-slave
  5.   labels:
  6.     app: redis
  7. spec:
  8.   selector:
  9.     matchLabels:
  10.       app: redis
  11.       role: slave
  12.       tier: backend
  13.   replicas: 2
  14.   template:
  15.     metadata:
  16.       labels:
  17.         app: redis
  18.         role: slave
  19.         tier: backend
  20.     spec:
  21.       containers:
  22.       - name: slave
  23.         image: docker-all.devops.etat-ge.ch/google_samples/gb-redisslave:v3
  24.         resources:
  25.           requests:
  26.             cpu: 100m
  27.             memory: 100Mi
  28.           limit:
  29.             cpu: 500m
  30.             memory: 200Mi
  31.         env:
  32.         - name: GET_HOSTS_FROM
  33.           value: dns
  34.           # Using `GET_HOSTS_FROM=dns` requires your cluster to
  35.           # provide a dns service. As of Kubernetes 1.3, DNS is a built-in
  36.           # service launched automatically. However, if the cluster you are using
  37.           # does not have a built-in DNS service, you can instead
  38.           # access an environment variable to find the master
  39.           # service's host. To do so, comment out the 'value: dns' line above, and
  40.           # uncomment the line below:
  41.           # value: env
  42.         ports:
  43.         - containerPort: 6379
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement