apiVersion:apps/v1# for versions before 1.9.0 use apps/v1beta2kind:Deploymentmetadata:name:redis-masterspec:selector:matchLabels:app:redisrole:mastertier:backendreplicas:1template:metadata:labels:app:redisrole:mastertier:backendspec:containers:-name:masterimage:k8s.gcr.io/redis:e2e# or just image: redisresources:requests:cpu:100mmemory:100Miports:-containerPort:6379
apiVersion:apps/v1# for versions before 1.9.0 use apps/v1beta2kind:Deploymentmetadata:name:redis-slavespec:selector:matchLabels:app:redisrole:slavetier:backendreplicas:2template:metadata:labels:app:redisrole:slavetier:backendspec:containers:-name:slaveimage:gcr.io/google_samples/gb-redisslave:v1resources:requests:cpu:100mmemory:100Mienv:-name:GET_HOSTS_FROMvalue:dns# Using `GET_HOSTS_FROM=dns` requires your cluster to# provide a dns service. As of Kubernetes 1.3, DNS is a built-in# service launched automatically. However, if the cluster you are using# does not have a built-in DNS service, you can instead# access an environment variable to find the master# service's host. To do so, comment out the 'value: dns' line above, and# uncomment the line below:# value: envports:-containerPort:6379
apiVersion:apps/v1# for versions before 1.9.0 use apps/v1beta2kind:Deploymentmetadata:name:frontendspec:selector:matchLabels:app:guestbooktier:frontendreplicas:3template:metadata:labels:app:guestbooktier:frontendspec:containers:-name:php-redisimage:gcr.io/google-samples/gb-frontend:v4resources:requests:cpu:100mmemory:100Mienv:-name:GET_HOSTS_FROMvalue:dns# Using `GET_HOSTS_FROM=dns` requires your cluster to# provide a dns service. As of Kubernetes 1.3, DNS is a built-in# service launched automatically. However, if the cluster you are using# does not have a built-in DNS service, you can instead# access an environment variable to find the master# service's host. To do so, comment out the 'value: dns' line above, and# uncomment the line below:# value: envports:-containerPort:80
apiVersion:v1kind:Servicemetadata:name:frontendlabels:app:guestbooktier:frontendspec:# comment or delete the following line if you want to use a LoadBalancertype:NodePort# if your cluster supports it, uncomment the following to automatically create# an external load-balanced IP for the frontend service.# type: LoadBalancerports:-port:80selector:app:guestbooktier:frontend