title: How to run a S3 backed private docker registry in kubernetes?
body: <p>I have a private AWS S3 backed docker registry running in a container on a fedora 21 host.  I'm trying to move that setup into kubernetes.</p>
  
  <p>My configs,</p>
  
  <p>registry-service.yaml</p>
  
  <pre><code>apiVersion: v1beta3
  kind: Service
  metadata:
    labels:
      name: registry
    name: registry
  spec:
    ports:
    - name: registry
      port: 5000
      protocol: TCP
      targetPort: 5000
    selector:
      name: registry
  </code></pre>
  
  <p>registry-controller.yaml</p>
  
  <pre><code>apiVersion: v1beta3
  kind: ReplicationController
  metadata:
    labels:
      name: registry
    name: registry
  spec:
    replicas: 1
    selector:
      name: registry
    template:
      metadata:
        labels:
          name: registry
      spec:
        containers:
          -
            env:
              -
                name: SETTINGS_FLAVOR
                value: s3
              -
                name: AWS_BUCKET
                value: docker-registry
              -
                name: STORAGE_PATH
                value: /registry
              -
                name: AWS_KEY
                value: XXXXXXXXXXXXX
              -
                name: AWS_SECRET
                value: XXXXXXXXXXXXXX
              -
                name: SEARCH_BACKEND
                value: sqlalchemy
            image: registry
            name: registry
            ports:
              -
                containerPort: 5000
                protocol: TCP
  </code></pre>
  
  <p>Then running,</p>
  
  <pre><code>kubectl.sh create -f registry-service.yaml
  services/registry
  
  kubectl.sh create -f registry-controller.yaml
  replicationcontrollers/registry
  </code></pre>
  
  <p>kubectl.sh get pods</p>
  
  <pre><code>NAME                                                                   READY     REASON    RESTARTS   AGE         2d
  registry-83icn                                                         0/1       Running   13         7m
  </code></pre>
  
  <p>checking the logs it looks like a DNS issue,  I'm not sure where to proceed from here.</p>
  
  <pre><code>kubectl logs registry-83icn
  
  Error: 'tcp://10.0.173.63:5000' is not a valid port number.
  </code></pre>
  
  <p>What am I missing here?  Do I need to configure DNS somewhere?</p>