apiVersion: v1
kind: ReplicationController
metadata:
  name: backend-contr
  # these labels can be applied automatically
  # from the labels in the pod template if not set
  labels:
    app: graphviz
    tier: backend
spec:
  replicas: 2
  # Pod Template
  template:
    metadata:
      labels:
        app: graphviz
        tier: backend
    spec:
      containers:
      - name: server
        # Public docker hub image
        image: omerio/graphviz-server
        args: ["8080"]
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        ports:
          # K8s ports docs
          # http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_containerport
          # The port exposed by the container
        - containerPort: 8080
