...

Text file src/k8s.io/kubernetes/test/e2e/testing-manifests/guestbook/redis-slave-deployment.yaml.in

Documentation: k8s.io/kubernetes/test/e2e/testing-manifests/guestbook

     1apiVersion: apps/v1
     2kind: Deployment
     3metadata:
     4  name: redis-slave
     5spec:
     6  replicas: 2
     7  selector:
     8    matchLabels:
     9      app: redis
    10      role: slave
    11      tier: backend
    12  template:
    13    metadata:
    14      labels:
    15        app: redis
    16        role: slave
    17        tier: backend
    18    spec:
    19      containers:
    20      - name: slave
    21        image: {{.RedisImage}}
    22        # We are only implementing the dns option of:
    23        # https://github.com/kubernetes/examples/blob/97c7ed0eb6555a4b667d2877f965d392e00abc45/guestbook/redis-slave/run.sh
    24        command: [ "redis-server", "--slaveof", "redis-master", "6379" ]
    25        resources:
    26          requests:
    27            cpu: 100m
    28            memory: 100Mi
    29        env:
    30        - name: GET_HOSTS_FROM
    31          value: dns
    32          # If your cluster config does not include a dns service, then to
    33          # instead access an environment variable to find the master
    34          # service's host, comment out the 'value: dns' line above, and
    35          # uncomment the line below:
    36          # value: env
    37        ports:
    38        - containerPort: 6379

View as plain text