apiVersion: v1
kind: ReplicationController
metadata:
  name: webapp-controller
spec:
  replicas: 1
  selector:
    name: webapp
  template:
    spec:
      containers:
        - name: webapp
          image: master:5000/webapp
          ports:
            - containerPort: 80
          resources:
            requests:
              memory: "100Mi"
              cpu: "200m"
            limits:
              memory: "200Mi"
              cpu: "400m"
          livenessProbe:
            httpGet:
              path: /health
              port: 80
            initialDelaySeconds: 20
            timeoutSeconds: 5
          readinessProbe:
            httpGet:
              path: /health
              port: 80
            initialDelaySeconds: 10
            timeoutSeconds: 5
    metadata:
      labels:
        name: webapp
        uses: db