apiVersion: v1
kind: ReplicationController
metadata:
  name: myweb
spec:
  replicas: 1     # spec.selector与spec.template.metadata.labels，这两个字段必须相同，否则下一步创建RC会失败。
  selector:
    app: myweb
  template:
    metadata:
      labels:
        app: myweb
    spec:    
      containers:
        - name: myweb    
          image: kubeguide/tomcat-app:v1   
          ports:         
          - containerPort: 8080
          env:       
          - name: MYSQL_SERVICE_HOST
            value: 'mysql'
          - name: MYSQL_SERVICE_PORT
            value: '3306'
