Spinnaker - Kubernetes - Can't find docker containers

10/1/2017

I have installed spinnaker and kubernetes as suggested in the manual https://www.spinnaker.io/guides/tutorials/codelabs/kubernetes-source-to-prod/

Thing is, I cannot seem to be able to access my docker containers on Docker Hub via Spinnaker in step 3 in the manual.

Here is my spinnaker.yml (the relevant part):

kubernetes:
# For more information on configuring Kubernetes clusters (kubernetes), see
# http://www.spinnaker.io/v1.0/docs/target-deployment-setup#section-kubernetes-cluster-setup

# NOTE: enabling kubernetes also requires enabling dockerRegistry.
enabled: ${SPINNAKER_KUBERNETES_ENABLED:true}
primaryCredentials:
  # These credentials use authentication information at ~/.kube/config
  # by default.
  name: euwest1.aws.crossense.io
  dockerRegistryAccount: ${providers.dockerRegistry.primaryCredentials.name}

dockerRegistry:
# For more information on configuring Docker registries, see
# http://www.spinnaker.io/v1.0/docs/target-deployment-configuration#section-docker-registry

# NOTE: Enabling dockerRegistry is independent of other providers.
# However, for convienience, we tie docker and kubernetes together
# since kubernetes (and only kubernetes) depends on this docker provider
# configuration.
enabled: ${SPINNAKER_KUBERNETES_ENABLED:true}

primaryCredentials:
  name: crossense
  address: ${SPINNAKER_DOCKER_REGISTRY:https://index.docker.io/}
  repository: ${SPINNAKER_DOCKER_REPOSITORY:crossense/gator}
  username: crossense
  # A path to a plain text file containing the user's password
  password: password #${SPINNAKER_DOCKER_PASSWORD_FILE}

enter image description here

Thank you guys, in advance, for any and all of the help :)

-- Max Vlaschuk-Gorelik
continuous-deployment
docker
dockerhub
kubernetes
spinnaker

3 Answers

10/11/2017

It may be a copy/paste error, but your kubernetes.enabled and dockerRegistry.enabled looks to be mis-indented.

-- Travis Tomsu
Source: StackOverflow

10/5/2017

Spinnnaker is really tricky to configure. I have no idea what is your problem but I would recommend you to setup spinnaker using the helm chart, it abstract all the configuration and deployments for you

https://github.com/kubernetes/charts/tree/master/stable/spinnaker

-- Giancarlo Rubio
Source: StackOverflow

10/11/2017

I believe the issue is that the docker registry does not provide index services. Therefore you need to provide a list of all the images that you want to have available.

dockerRegistry:
  enabled: true
  accounts:
  - name: spinnaker-dockerhub
    requiredGroupMembership: []
    address: https://index.docker.io
    username: username
    password: password
    email: fake.email@spinnaker.io
    cacheIntervalSeconds: 30
    repositories:
    - library/httpd
    - library/python
    - library/openjrd
    - your-org/your-image
  primaryAccount: spinnaker-dockerhub

The halyard commands to execute this is:

export ACCOUNT=spinnaker-dockerhub

hal config provider docker-registry account edit $ACCOUNT --repositories [library/httpd, library/python]
hal config provider docker-registry account edit $ACCOUNT --add-repository library/python

This will update your halyard config file, pending a deploy.

Note, if you do not have access to one of the images, the command will likely fail.

-- GreenKiwi
Source: StackOverflow