github.com/qsunny/k8s@v0.0.0-20220101153623-e6dca256d5bf/examples-master/guestbook/legacy/redis-slave-controller.yaml (about)

     1  apiVersion: v1
     2  kind: ReplicationController
     3  metadata:
     4    name: redis-slave
     5    labels:
     6      app: redis
     7      role: slave
     8      tier: backend
     9  spec:
    10    replicas: 2
    11    template:
    12      metadata:
    13        labels:
    14          app: redis
    15          role: slave
    16          tier: backend
    17      spec:
    18        containers:
    19        - name: slave
    20          image: gcr.io/google_samples/gb-redisslave:v1
    21          resources:
    22            requests:
    23              cpu: 100m
    24              memory: 100Mi
    25          env:
    26          - name: GET_HOSTS_FROM
    27            value: dns
    28            # If your cluster config does not include a dns service, then to
    29            # instead access an environment variable to find the master
    30            # service's host, comment out the 'value: dns' line above, and
    31            # uncomment the line below:
    32            # value: env
    33          ports:
    34          - containerPort: 6379