1.ReplicationController and ReplicaSet Introduction
The main role of RC (ReplicationController) is used to ensure that the number of copies of copies of the number of container application is always maintained at a user-defined. That is, if there is an abnormal exit the container will automatically create a new Pod in place; and if the abnormal extra container will automatically recover Kubernetes
The official recommended RS (Replicaset) replace RC (ReplicationController) deployment, RS no essential difference with the RC, but not the same name, and a set of support RS-style selector
⒉ReplicaSet resource file example
apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
name: frontend
spec:
replicas: 3 # There are three copies
selector: # tag selector
matchLabels:
tier: frontend
template: # Template
metadata:
1abels:
tier: frontend
spec:
containers:
- name: php-redis
image: gcr.io/google_samples/gb-frontend:v3
env:
- name: GET_HOSTS_FROM
value:dns
ports:
- containerPort: 80
⒊Deployment Introduction